I use simple code for look at.
transform.LookAt(Target);
But as you can see my object doesn’t rotate properly. What am i missing?
It is working perfectly fine. It’s just that the object that’s looking is not facing in the right direction. The default facing needs to be “forward” as in positive Z axis. If you drop the mesh in and its “face” isn’t pointing along positive Z it is not oriented correctly. You can either fix this in the 3d modeling program or parent it to another rotated game object that makes the child object face along positive z.
3 Likes
Thank you, i fixed.