Real time object position and rotation

Like the panel in this example:

But instead of Meshes and Active meshes, I would like to return the object real time rotations and position relative to the ground plane in that project:

What is the equivalent “scene.meshes.length” for the object actual rotation and position?

Context: I’m trying to create a attitude control for a drone (for simulations and control method tests), so the first step is to reach those values and print then on the screen, but after that I’ll need then to feedback as error and use then to regulate the impulse from each motor. Any examples out there?

Hi,tttamer.
I’m not sure what the problem you want to resolve.
If you want to know how to get the absolute infor between box and ground?
We can use the mesh worldMatrix to do this.
For example:

Hope it helps you.

1 Like

Or the abovementioned example with GUI - https://playground.babylonjs.com/#6BUP3K#6

1 Like

Amazing! Thanks a lot!!

1 Like