Hello, so recently i tried to make a new project however i’m being stop by a pretty stupid problem actually.
So i have part with a BodyVelocity that aim in a direction at a pretty high speed and i would like to stop the part at the moment where it touch a part.
So as you can see in this picture, the grey part is the one being stopped right at the moment when it touch the other part. I tried a lot of thing like .Touched , RayCast , Region3 , GetTouching Part in Loop with RunService. But most of the time the part stop before or after hitting the part because of the latencie. So i would like to know if someone have an idea to make it stop perfectly when it touch
Instead of using BodyVelocity, you should use TweenService. This lets you move a part from anywhere to a specific point. It would make things a lot easier and smoother.
Unless you are interested in creating your own collision detection I highly suggest you just use unanchored parts.
If your parts are rectangular are both aligned with eachother then you can just the point where PartA touches PartB is just the edge of PartA which can be found using the size of PartA. PartA.Size.X / 2
However to do this simple method it requires that both parts are aligned with eachother. If one is rotated you will get incorrect results.