Movement Translation

Hello everyone!

In the example below, any suggestions for turning the rotational motion of the “pilot” into forward movement of the “sphere” along the sphere’s axis (the white line). The math makes sense, but being new to programming, I’m not sure what that code would look like.

For instance: Every 180 degrees of pilot rotation equals 10 units of sphere movement along its axis.


Hello Anderson!

It can look look like this:

The changed lines are 36, 49 and 52

More playground examples on this page Rotate Around an Axis About a Point - Babylon.js Documentation

That’s perfect, thanks @Gijs! Also, thanks @JohnK for the link to the examples! :+1:

1 Like