By your first post I am starting to think that you want to know if there is a way to calculate the position and rotation where a rigidbody will be at some future point in time. If that is the case, then I am fairly certain that the engine simply does not have that information, because all physical motions are calculated in the following way:
- 1) Move the rigidbody by a distance based on the current velocity and the fixed time step.
- 2) After it was moved, check to see if it is in contact with another collider.
- 3) If collision: calculate the new velocity based on the collision to prepare for next frame.
- 3) If not collision: nothing happens, object keeps its current velocity, plus velocity modifications due to influence of gravity and drag (if they are active).
- 4) Process repeats for the next frame.
The key here is that each rigidbody motion is calculated on a FixedUpdate step by step basis, and has no idea where it will be beyond the current step. The only way to figure out where a rigidbody will be after some period of time is by letting the rigidbody run it's course. This kind of thing is exactly what rigidbodies are for.
That said, I suppose you could maybe calibrate a secondary rigidbody to run faster than is realistic, and attached to an invisible clone of your object. This would be a way to get a future position faster (but not instantly) technically speaking, but making it work realistically at a faster pace would be challenging. You would have to apply a custom gravity force to it, change the mass on it, and then in addition to the giant pain in the ass you've gone through, you haven't actually optimized much, since you had to use a rigidbody to predict the future position and rotation anyway.
↧