Hey all,
As I understand Object3D
methods such as translateOnAxis translate an Object
by its local Axis. I want my Object to translate about a particular normalizedVector but not about its local Axis but rather by worldAxis. How should I go about it? Thanks in Advance.
Naive way: simply change object.position
manually (not using translate
methods.)
Prestigious way :
- Create new Matrix4 instance.
- Use makeTranslation to translate the matrix (works the same way as translating 3D object, feel free to also rotate and scale.) This matrix is a global transformation - if you’d like to make it local, you’d use Object3D.matrix instead.
- Use Object3D.applyMatrix4 to apply the matrix to your object.
2 Likes