Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[Solved] AddForce vs AddForceAtPosition?

Discussion in 'Scripting' started by makc, Dec 18, 2009.

  1. makc

    makc

    Joined:
    Dec 8, 2009
    Posts:
    15
    Another stupid question, why
    Code (csharp):
    1. function FixedUpdate () {
    2. rigidbody.AddForce (transform.TransformDirection (0, 0, 10));
    3. }
    and
    Code (csharp):
    1. function FixedUpdate () {
    2. rigidbody.AddForceAtPosition (
    3.     transform.TransformDirection (0, 0, 10),
    4.     transform.TransformPoint (new Vector3 (0, 0, 0)));
    5. }
    produce different results?

    edit: self-resolved... again :(
     
unityunity