Search Unity

How do I add a force to a rigidBody to move it backwards?

Discussion in 'Physics' started by DerrickLau, Aug 18, 2017.

  1. DerrickLau

    DerrickLau

    Joined:
    Sep 29, 2013
    Posts:
    70
    Trying to make my character walk backwards by getting a velocity vector in the opposite direction:

    Direction = _character.transform.forward * -1;

    Then applying it to my character's rigidbody:

    _rigidbody.AddForce(Direction, ForceMode.Impulse);

    However, my character continues to walk forward.

    What am I doing wrong?
     
  2. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    Do you get an error with the assignment of Direction?
    You will only be applying 1 unit of force to a Rigidbody which may be too little if it has plenty of mass;