Answer the question
In order to leave comments, you need to log in
Why does AddForce work differently?
Hello. I was writing a simple game and ran into the following problem:
I have a cube that I want to control. It was not possible to do movement through Translate, because the cube did not interact well with other objects (it entered them and immediately jumped out), so I decided through AddForce.
After writing the following code :
if (Input.GetKey (KeyCode.W)) //Движение вперед
{
MainRigid.AddForce(transform.forward * moveSpeed);
}
Answer the question
In order to leave comments, you need to log in
I figured it out, you need to use a different physical material for the cube and the surface.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question