I am trying to add force to an object with input.getaxis but it does not seem to work for some reason. If I try to translate an object using the same method it seems to work, but how would I go about adding forces? Right now my object does not move at all.
Code:
var moveSpeed : float = 10.0;
function FixedUpdate () {
var translation : float = Input.GetAxis ("Vertical") * moveSpeed;
translation *= Time.deltaTime;
rigidbody.AddRelativeForce (0, 0, translation);
}
I can’t seem to grasp what I am doing wrong since translating an object with the same method worked.