Rotation around another node


I am a bit confused how to use the setarent, rotateAround stuff.

ok, in the setup I create two sphere

in the update and draw cycle I move the parent sphere, the childspere is following the parent with some friction…

moonSphere.setPosition(vX, vY, 0);
everthing works fine. the child follows the parent with some friction

Now I want to give the child sphere a own rotation speed around the parent, like the moon around the rotating earth.
I do not know how I should do this rotation.


you can use orbit but since the object is already parented you need to orbit around 0,0 instead of the position of the other object:

moonSphere.orbit(lat, lon, radius, {0,0,0});