I have a problem : I have a cube and I want it to go where I want (forward, backward, left or right). The problem is when I rotate the camera, the "forward" direction must be in front of it everytime, same for others directions.
In fact I already got it to work with forward and backward by doing this :
// For forward
camera.getWorldDirection( direction )
cube.position.add(direction)
// For backward
camera.getWorldDirection( direction )
cube.position.sub(direction)
My real question is how I do to "rotate" the vector direction at 90° so I just have to add and sub to the cube position to go left and right ?