I'm building a project that includes a few asteroids tumbling through space. To get a nice stable tumbling, I used CreateRotationAnimator from the 11.PerPixelLighting example (where you set the earth turning slowly).
My problem is that if you specify any more than one of the Cartesian axes for tumbling, you get sort of an intelligent spin. What I'd rather is tumbling around an arbitrary axis. Guess I can do it manually, but it sure would be nice if there was a way to do it with CreateRotationAnimator. Does anybody have experience with this?
Thanks,
Dave
CreateRotationAnimator on arbitrary axis
Re: CreateRotationAnimator on arbitrary axis
I suppose you have to write your own rotation animator for that. Irrlicht still might help you a little bit - the quaternion class has a function to create a quaternion from an axis + angle. And then you can convert the quaternion to a rotation matrix or to euler angles.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm