Cross
![cross](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/cross-297f9bae0fc021a9f68f1d78aa82c704.png)
Use Cross to calculate the cross product between two vectors. The cross product is a vector that is perpendicular to the input two vectors. Supported types: Vec3, and Vec4. Cross is in the Math category.
Input
Name | Data Type | Description |
---|---|---|
A | Vec4 | The first vector. |
B | Vec4 | The second vector. |
Output
Name | Data Type | Description |
---|---|---|
Result | Vec4 | The result of the cross product. |
Example
![cross example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/cross_example-efc7ccfcd27c191f41af8ea784f24f79.gif)
This example shows that the pink sphere’s position is always perpendicular to the plane that consists of the other green spheres.
![cross node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/cross_node-7016b9d2f9f12e8b3a0f79e6ff896b43.png)