How to make an entity look the player?

How would I make an entity look at the player?

Hi @Mason_Rocchio,

You can use the following API method:

https://developer.playcanvas.com/api/pc.Entity.html#lookAt

1 Like

which one would make it so it looks at the player?

You will have to reference the player entity in your script and pass its position the lookAt method.

Try studying the manual to learn more about scripting works:

https://developer.playcanvas.com/en/user-manual/scripting/

You can find some more information about the lookAt function in the topic below.

https://forum.playcanvas.com/t/lookat-function-always-backwards