Rotate Around
![rotate around](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/rotate_around-c79cd639de4d2ecc236f60a35c1ca6bb.png)
Use Rotate Around to rotate an input point with a given angle around a given axis. Rotate Around is in the Transform category.
Input
Name | Data Type | Description |
---|---|---|
A | Vec3 | The first point on the axis. |
B | Vec3 | The second point on the axis. A and B form the axis to rotate around. |
Angle | Number | The rotated angle in radians. |
Current | Vec3 | The point to rotate. |
Output
Name | Data Type | Description |
---|---|---|
Result | Vec2 | The rotated position. |
Example
![rotate around example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/rotate_around_example-b13f5d5377389f871fc41e435b0f4d57.gif)
This example uses the Rotate Around node to rotate a cube around Vec3(0,0,1) whenever there is a tap stay event.
![rotate around node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/rotate_around_node-d7a3ee5e82e905374943a217549a1c63.png)