Okay - so I have got a problem with addForce. At the moment my character is a cube which is moving around in a 3-dimensional space. However when it is on the floor it starts to roll instead of slide. I tried to deactivate gravity and let it float in the air above the course and here the sliding works perfectly fine. Now I deactivate gravity when it is on the ground, and now it only rolls over occasionally.
transform.rigidbody.AddRelativeForce(Vector3.forward * moveSpeed);
This is the code used to move my character.
Can someone help me solve this?
↧