DEV Community

HandsomeTan
HandsomeTan

Posted on

Explanation of the translateOnAxis() function in Three.js

translateOnAxis() takes two parameters: vector3 and distance.
The first parameter indicates in which direction Object3D translate and it' s a vector3 that require to be normalized. The second parameter represents translate distance.
Note: vector3 must be normalized, otherwise the distance paramter could be incorrect for Object3D

Top comments (0)