- Home /
LookAt() with X axis
I'm trying to use the LookAt(Target); function but the way I have everything set up, means that I need the X axis to look at the target and not the Z axis. I've had a look at lots of different forums but can't find a proper answer. I need the object to have the X axis looking at the target instead of the Z.
thanks in advance
Ben.
P.S. I don't mind rewriting the lookat function so it works with the X axis if I have to but I don't know how it works.
Comment
Answer by MadsWiering · Mar 02, 2018 at 10:03 PM
https://docs.unity3d.com/ScriptReference/Transform.LookAt.html
This should have all the information you need.