Animation console.log position.y of a mesh

How i can Track the position.y of a mesh while the animation is running.

like in this example how i can console.log the position of the sphere
or how i can console.log the position when the frame hit the last value of it


thia is a very naive approach, but the simplest way would be this - Babylon.js Playground (

You can stop this loop once the animation stops, but this depends on your use case

1 Like


can I ask why the Y position in the console giving me every time a different value
if you can check the console every time the value change
is there a way to fix the values ?

you can set the value yourself, if it makes sense. The value changes are marginal, they won’t be 100% exact thou. They are “equal with epsilon”