- Home /
Make a moving rigidbody treat a ramp of a certain angle as a wall
I'm making a racing game that uses simple, spherical rigidbodys as the vehicles. These vehicles have the ability to start flying once they take off from the ground. The problem is that they should not be able to take off of certain ramps above a certain angle.
Imagine the rigidbody is moving with a velocity towards a ramp. If that ramp's normal angle is less than a predefined value, the rigidbody will move up the ramp with no problem. If the ramp's normal angle is equal to or greater than that same predefined value, the rigidbody needs to come to a complete stop, as if it ran into a flat, 90 degree wall. It shouldn't get bumped upwards or move up the ramp at all.
Anyone have any ideas on how I'd go about doing this?
Your answer
Follow this Question
Related Questions
Added force to rigid body, but wont move same speed as horizontal speed... if rotating 1 Answer
Can you pls help me fix this rigidbody collision problem 0 Answers
Rigidbody physics - equalizing force 1 Answer
how to have a fixed movement using rigidbodies without animations 0 Answers
How to lerp a car while it's moving forward at a constant velocity 0 Answers