Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Rotation around another node

$
0
0

@mindthegap wrote:

hello,

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

ok, in the setup I create two sphere
childSphere.setParent(parentSphere);

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.

regards

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929