Search Unity

Normalized Direction of one point..

Discussion in 'Physics' started by EliJNemer, Oct 12, 2019.

  1. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    123
    hello,

    a simple Question..

    is there a way to get the unit Vector of a one game object, thus one point in space?

    currently in the vector cookbook it shows how to get the normalized direction between 2 points..
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    And where would this one point point towards?

    If you need to generate direction for your points (positions), you could probably pick an arbitrary direction, like world up (Vector3(0,1,0)) for example?

    It would help if you told more about your use case.
     
    EliJNemer likes this.
  3. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    123
    hey thanks, i was able to solve the problem, i just created a ray forward and got the point 1 unit ahead and then made the normalization it worked well thanks:)
     
    Olmi likes this.