@juss wrote:
Hi! I am beginner with 3D in OF and have tried to solve a rotation problem, the answer is probably something simple!
I have a 3D primitive sphere that rotates to left and right based on interaction:
sphere.rotate (rotChangeX, 0.0, 1.0, 0.0);
This works fine. However, I would want the sphere to spin up and down as well when I get certain Y values. The X rotation can meanwhile continue or be stopped, does not matter. I have tried many combinations following this guide but so far with no success:
https://openframeworks.cc/documentation/3d/ofSpherePrimitive/For example, if I use this combination I still get only the X rotation, not on Y axis:
sphere.rotate (rotChangeX, 0.0, 1.0, 0.0); sphere.rotate(rotChangeY, 0, 1.0, 0.0);
Any help is welcome
warm thanks!
UPDATE:
this did the trick!
sphere.rotate (1.0, rotChangeX, 0, 0.0);
Posts: 1
Participants: 1