LookAt (Y axis only)

AndyC 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3


I'm working on a flow graph that instructs a gameObject to rotate on it's Y axis and look at the camera. I have something working but it's not the best. Firstly I use Transform.LootAt (Target) which changes all axes, then I reset the X and Z back to 0.

Can anybody suggest the correct way to do this?

Many thanks in advance


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Hard look at

Smooth look at

Download Macro: LookAt.asset


Thanks Quacklin for such a fast response. Works perfectly! 

Many thanks