How to get Rigidbody to work??

When I play, the ball will initially drop into the map, as expected, but when I then rotate the map, the ball stays in place and when I rotate the map so much that it is no longer under the ball, the ball will have gravity again and drops into the void.

I don’t know how to fix this, plz help.

Do you use transform to rotate the map?

Can you add a piece of the code, please? To help you further.

1 Answer

1

Do you rotate your board using Torque? You shouldn’t change the rotation directly, especially when dealing with rigidbodies.

If you do use torque, make the walls of the board thicker.

No I am not using Torque, I'm using transform.rotate

Using Torque fixed the problem, but now the board will rotate infinitely without a button pressed down.if (Input.GetButton ("Horizontal")) { float turn = Input.GetAxis ("Horizontal"); rb.AddTorque (transform.right * speed * turn); } if (Input.GetButton ("Vertical")) { float turn = Input.GetAxis ("Vertical"); rb.AddTorque (transform.forward * speed * turn); }