I’ve been searching through the Dev Forums on how to calculate the landing position of a ball and the post I had came across https://devforum.roblox.com/t/how-to-get-the-landing-position-of-a-ball/2062367/3. Despite it proving useful it had not worked for me and was the stepping stones to what I want to accomplish. I would like to create a system similar to this;
Using the information that the ball is moved by a Body Velocity instance with it’s velocity being the set to the Mouse.Hit.LookVector multiplied by 100 and then being destroyed after 0.3 seconds how would we be able to calculate the landing position of the ball.
What made it not work for you? That resource is really well explained. I don’t really see an easier solution for this other than just rather having a constant raycast pointing to the ground and showing the current position of the ball relative to the ground.
What’s more is that if the game you’re showing has its own custom-scripted physics equations for the ball and not using roblox objects like Body Velocity then there’s not really a similar solution for you
Whenever I input the ball’s Velocity and the ball’s position and print it out it returns as nan, nan, nan and when I instance a part at said position it ends up in a position of vector3.new(0, -340282346638528859811704183484516925440, 0) every time. I tired do something basic like setting the velocity of a part to vector3.new(10,20,10) and then inputting the velocity and then the parts position like done in the example within the post and the same problem occurred.
The problem with this is that instead of using some sort of body mover or velocity to move the ball it has the ball moving across using CFrame. I want to calculate the landing position whilst using a body mover or the part velocity it’s self.