Hello, this may be a fun challenge for someone with cool results.
Below is a Playground of a rectangle orbiting a cube.
How to make the rectangle rotate in parallel to cube surface? (orthogonal).
http://www.babylonjs-playground.com/#IHBB35#1
Details: a cube is rotating on the X Axis, a rectangle has a Y position change off a Raytrace, emulating gravity, like an old time record-player.
Goal: rotate rectangle to be parallel to rotating cube.
Guess: Perhaps a specialized rotate from ray.direction to mesh.rotate.
Problem: Half the time the rotations are correct (parallel), with cube on a margin, and half the time the rectangle length is perpendicular to the cube, intersecting. That is the challenge.
Guess Details: the needed rotation appears to be a conversion from : ray.direction into mesh.rotate() <- But I have not discovered that part yet.
How to do that?
The notion is for an example of a Character to be able to roll a Planet. And maybe there is a better way?
Thanks-much,