How to use AddForce in a direction relative to the abject (C#)

To be specific, my end goal in to have the mouse look script on a flying object. Wherever the camera is aimed would be the direction AddForce pushes towards.

What I would really like answered though is how to apply force in the direction a game object is facing.

This is an attempt at visualizing my issue: http://i.imgur.com/PP5AFZm.jpg

When you apply force in the X direction, a cube will move along the X parameter, when it’s on its side, it still moves in the same direction. I would like the force to be relative to the cube, so that which ever way the cube is facing is the direction it moves in.

rigidbody.AddForce(transform.forward * amount);

Use rigidbody.AddRelativeForce instead :slight_smile: