Search Unity

What determines the point focused on when doing transform.LookAt?

Discussion in 'Physics' started by breakspirit, Nov 1, 2015.

  1. breakspirit

    breakspirit

    Joined:
    Aug 11, 2013
    Posts:
    30
    For many of my models, the "center" point is at the very bottom of the model so that if I do transform.LookAt, it looks at their feet. This also screws up targeting because sometimes the foot is under the ground and targeting fails. What determines where this point is on the model? I don't even know what that point is called on the model. I'd really like to alter that point if it is possible.

    Thanks
     
  2. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Its meshes' pivot. You can change it in 3d modeling software like 3ds max.
     
  3. DrBlort

    DrBlort

    Joined:
    Nov 14, 2012
    Posts:
    72
    Also, you could add an empty GameObject as a child to your model, locate in the position which you'd like to look at, and use it as target for LookAt.