Skip to content

Instantly share code, notes, and snippets.

@Gojeflone
Created February 17, 2014 02:18
Show Gist options
  • Save Gojeflone/9043622 to your computer and use it in GitHub Desktop.
Save Gojeflone/9043622 to your computer and use it in GitHub Desktop.
Distinguish between local and world directions in script
function Update () {
//transform.Translate(Vector3(0,0,1) * Time.deltaTime);
var fwd = transform.forward * 100;
rigidbody.AddForce(fwd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment