rotating a model in circular path

I have a model at a position (-1,0,0) and I want to rotate this model in a circular path having the center at 0,0,0 at a distance of 1. If i create a dummy node path and attach this and rotate the dummy this model rotates but the actual position of the model is not changing. If i want to shoot the model the bullet is not hitting the model. When I tracked the position of the model during rotation the actual position remains unchanged at -1,0,0.
can some one help me how to rotate the model in a circular path without havig a dummy node path.


did you look at the solar system demo?

Usually, a dummy node path is what you want to use for things like rotation. The model’s position (retrieved by getPos wth no arguments) is relative to whatever its parent is, so if you parent it to a node that you are rotating, the model’s relative position will not change over time; it’s still one unit away from the origin of its parent.

If you want to find the model’s location relative to some other coordinate frame (such as the top-level frame), you can override getPos’s default argument to specify a NodePath relative to which the position should be sampled.


it is not actually rotating the model. It is actually moving a model in a circular path. i.e. changing the position of the model in a circular path.


ok, lemme see:
ok, let’s pretend you have two objects: (Dummy) and (child)
you attach the child to the dummy.
you give the child an xpos of 5
when you rotate the dummy, the child moves around the dummy, always keeping a distance of 5.
get it?

Thank u all for ur help.
mtomczak’s sugession works out well for my program.

Thanks once again,