How to estimate where a rigidbody will land

I would like to know how to calculate where a rigidbody will land, I’m very new to c# to very detailed answers would be very appreciated.

You can take the velocity of the rigidbody, the direction… all this information you can use it to calculate with easy ecutions like this x + vt +1/2*t^2= destination in X axis

Your post doesn’t say much about what exactly the behavior of the object is supposed to be, so I’ll make some assumptions. Firstly, I’m assuming that your rigidbody is only subject to a constant acceleration (for example, usual gravity). Secondly, I’m assuming that you’re launching the rigidbody from one position and wondering when it will be at a specific height.

In that case, you want to use Kinematics equations (Google it if the term isn’t familiar). The first thing you need is to find the time-of-flight, or basically how long it will take for the rigidbody to get to the height you’re interested in. You’ll start with the following equation:

y2 = y1 + v1t + 1/2a*t^2

y2 = final height, y1 = start height, v1 = start y component of velocity, t = time, a = y component of acceleration

To find time, you need to solve this quadratic. I won’t go over how to do that here, but Google has plenty of references if you need help with that. (Search: Quadratic Equation)

Next, to find the final position (not just the final height), we use the same equation, but we include x and z this time, as well as our new time-of-flight value. This time:

d2 = d1 + v1tf + 1/2a*tf^2

d2 = final position (Vector 3), d1 = initial position (Vector 3), v1 = starting velocity (Vector 3), a = acceleration (Vector 3), tf = time-of-flight value.

That will give the final position of the rigidbody when it reaches a specific height (for example, ground level)

I apologize for everything being so close together, I don’t know why the extra lines between my paragraphs aren’t showing up lol.