# Real time object position and rotation

**URL:** <https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686>\
**Category:** Questions\
**Created:** [September 5, 2022, 10:30pm UTC](https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686 "2022-09-05T22:30:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tttamer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tttamer/32/26768_2.png) [@tttamer](https://forum.babylonjs.com/u/tttamer)\
**Post date:** [September 5, 2022, 10:30pm UTC](https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686/1 "2022-09-05T22:30:37Z")

</div>

Like the panel in this example:

> **[Babylon.js Playground](https://playground.babylonjs.com/#0PQ5MX%230)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

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:

> **[Babylon.js Playground](https://playground.babylonjs.com/#RHBQY9%23687)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

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?

---

<div class="post-metadata">

**Author:** ![Aze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aze/32/23050_2.png) [@Aze](https://forum.babylonjs.com/u/Aze)\
**Post date:** [September 6, 2022, 3:15am UTC](https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686/2 "2022-09-06T03:15:04Z")

</div>

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:

> **[Babylon.js Playground](https://playground.babylonjs.com/#6BUP3K%233)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Hope it helps you.

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [September 6, 2022, 3:52am UTC](https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686/3 "2022-09-06T03:52:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tttamer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tttamer/32/26768_2.png) [@tttamer](https://forum.babylonjs.com/u/tttamer)\
**Post date:** [September 6, 2022, 9:28pm UTC](https://forum.babylonjs.com/t/real-time-object-position-and-rotation/33686/4 "2022-09-06T21:28:52Z")

</div>

Amazing! Thanks a lot!!
