pointLight rotating around mesh (alt+leftClick input)

Hi.

I want to rotate pointLight around the mesh with ALT+LeftClick pressed.

How could I achieve that? I need to position light pivot in the center of the sphere. And somehow create inputs for Alt+LClick

https://www.babylonjs-playground.com/#WXF5WE

(Your PG is the default one)

YOu can set the point light as a child of a transformnode then set the position of the light to the correct distance.

Then when you detect ALT+LClick you can simply change the value of a flaot named alpha and use it like this:

var radius = 10;
light.position.x = radius * Math.cos(alpha);
light.position.z = radius * Math.sin(alpha);