I am somewhat familiar with Blender 3D, but I have very little experience with 3D programming and I am currently trying to work with three.js
.
My query is this: I have a basic cube that I rotated around the y-axis
; now I need to rotate it again around the y-axis
, but with the axis also rotated. In Blender, I would press the RKEY
twice.
To perform the first rotation, I used: cube.rotation.y += Math.PI*.5;
How can I achieve this in Three.js? I have attempted some matrix transformations as well, but haven't been successful.
--
@muimota assisted me with a JSFiddle, so I will provide further details below:
Thank you @muimota for your help. This example will allow me to clarify what I am attempting to accomplish! You can find an updated version of the fiddle with a more detailed explanation at this link: The cube has been rotated twice (y and z), and will now rotate endlessly along the y-axis
. My goal is to ensure that it always rotates parallel to one of its faces – just like the initial rotation was parallel to its top face.