Look At
![look at](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/look_at-152312d180d6b8404bfa09c78bfbc367.png)
Use Look At to get the new orientation of a position by setting a look-at target position. Supported types: Vec2 and Vec3. Look At is in the Transform category.
Input
Name | Data Type | Description |
---|---|---|
Self | Vec3 | The start position to look from. |
Target | Vec3 | The target position. |
Aim Dir | Vec3 | The direction of Self that aims to the Target. The Z axis of Self is the default value. |
Up | Vec3 | The up direction of Self. The Y axis of Self is the default value. |
Output
Name | Data Type | Description |
---|---|---|
Result | Vec2 | The new orientation of Self. |
Example
![look at example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/look_at_example-f5379d03151bd00dc4307635207b36ec.gif)
This example uses Look At to make a cube rotate around a center point while constantly looking at the target.
![look at node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/look_at_node-26ea24d00007fed2302979766ce6ffe1.png)