- Home /
Calculate where an object is going to land
Hello,
I am making a car game and there I want the car to be able to jump down hills and such. I would like to have the car turning in the air so as to land on the ground turned so that all 4 wheels touch ground at the same time. I know how to use raycasting to find the slope straight under the car by using the method at: http://answers.unity3d.com/questions/509692/slope-detection.html. That works somewhat but if the slope of the ground switches between upwards sloping and downward sloping, the car will move unrealistically in the air.
One method that I thought of was the car sending out another rigidbody object (without a mesh), with the same velocity as the car. If I could somehow make the physics simulation run faster for that object and it could the send back the information about the slope where it hit, since the car will hit at the same point later.
Is this something that is possible in Unity or does anyone have a better solution?
I have included a picture that hopefully can explain my question better(I hope you excuse that the graphics are still in pre-alpha;-)