Constant rotation?

Hi there.

How would I make an object constantly rotate around one axis? I have done some searching, but didn’t find anything.

Thanks

Hmmm… What is the problem exactly? You can create hprInterval and loop it as long as needed. Or just ask taskMgr to set new heading (or rotation, or pitch) every frame…
Edit: Or you want to rotate it not around its center, but around some other point in space? Then I would simply put a dummy node in that point, and reparent the object to it. Then you can rotate this dummy node, and the object will rotate with it.

Well basically I’m trying to make a planet keep rotating around the z axis. I still quite new to this and don’t really know how to use intervals.

It looks like you need to update heading.
Assuming your planet Hpr is initially (0, 0, 0), you can use the following interval:

i = planet.hprInterval(duration=10, hpr=VBase3(360, 0, 0))
i.loop()

It mean change heading from 0 to 360 degrees over 10 seconds, and then repeat. Read this and the following pages, they are helpful.

Have you seen the demos that ship with Panda? In particular, the Solar System demo?

David

Oh ya I forgot about those. Anyways, that worked. Thanks a lot.