- Home /
Can I make a ball bounce to a certain position?
Hi,
I'm not sure if there's a certain function to bounce to a certain position.
I have calculated every time it bounces, but now the target is moving, so it's hard to calculate.
Eventually, the squares are like a magnetic to drag the ball onto the square.
Can I get a piece of advice for this?
Thanks
un.png
(4.4 kB)
Comment
There is no certain function as you require in Unity, AFAI$$anonymous$$. But you can easily achieve this effect using parabolic path equation to find the trajectory and then move the ball over that trajectory to create a bounce effect.
You can refer to this question for more details: Calculating ball trajectory in full 3d world
Or refer additional questions from this link: Questions in topic: trajectory