The Look At node is used to make an object, the Rotating Target, always face towards another object, the Look At Target.
The Look At node is commonly used to create NPCs or hazards that track the player character but can be used in any situation where you want something in your game to face a certain direction based on the position of another object.
Rotating Target | The object that will turn to look at the other target |
Look At Target | The object that will be looked at by the first target |
Execute | Executes the node |
↳ On Start | Executes the node at the start of the game |
↳ Always | Executes the node on each frame |
Enabled | Enable or disable the node. Disabled nodes cannot be executed |
Use Vector Input | Uses Vector position as a Look At Target |
Look At Move Direction | The object will face the direction it is moving With this option enabled there will be no Look At Target |
Affect Physical | Determines if the movement includes the objects physical form |
Local Rotate | Determines if the Rotating Target uses its local or global transform |
Free Rotate | Determines if the Rotating Target should rotate on a single axis or freely on all 3 axis |
Look At Vector | Input a vector from another node to determine where the object looks |
↳ X, Y & Z | Manually set the X, Y & Z coordinates the object should look at |
Speed | Set how quickly the Rotating Target will follow the Look At Target |
Slowing | Slows the movement of the Rotating Target |
Here's a link to a demo that shows how to use the Look At node: