Move two bodies independent

I have two boxes, one on top of the other. I want the upper part to rotate independent of the lower one. If I use the next code;

this.top_entity.rotate(0, 1.0 * dt, 0);

the top is not moving with a constant speed but accelerating and deaccelerating and even stopping at a certain angle. It looks like it is feeling friction. Does someone have an example of how to achieve this behaviour?

Thanks!
Rob

I think I found it, using rotateLocal

1 Like

Hi @breinbaas and welcome!

Thanks for sharing your solution!

Please note that if you use dynamic rigidbodies, the rigidbodies are not rotating using rotate() or rotateLocal().

1 Like

Thanks, that is a really helpful link!