Rotate element along one of its local axis

I am trying to get an element that is already rotated to rotate along one of its axis. The playground here should illustrate what I’m trying to achieve: https://www.babylonjs-playground.com/#VYD2XE#19

The yellow spheres are all parented to the wider cylinder. I want the cylinder to rotate in place, but I’m always ending up with the cylinder rotate around the world Y axis instead of the local Y axis.

The desired effect is that it should look like the yellow spheres are orbiting around a planet.

Does anyone have an idea what I need to do here?

Hey did you try using `.rotate’ with LOCAL axis?
Doc: Rotate Around an Axis About a Point - Babylon.js Documentation

1 Like

I did not, somehow I missed that - fixes the issue: https://www.babylonjs-playground.com/#VYD2XE#20

Thank you very much!

1 Like