Hello
I'm trying to rotate a cube in object's space (local) based on a forward and a downward vector.
I want one of the object's side faces to point in a forward vector, while the cube's down face is pointing in the downward vector's direction.
How can this be done with Jpct-AE? I now how to do it in Monogame, but I can't make it happen with Jpct
I can make one of the directions with the following code, here the forward as an example..
cube.setRotationMatrix(forwardVector.getRotationMatrix());
But How do I combine this with the downward vector??
Regads, M
i always use object3d.setOrientation(forward vec, up vec) .
up vec is negative of downward vec.
only 6 float values (two vec3) are needed.
you need vectors in world space.
Thank you! I didn't see that function, thanks a million :)