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)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay