Start a new topic

How to get model's current position?


I am using the Android Javascript SDK and have a model that is constantly animated with PropertyAnimation. The animation changes the model's translate.x value between two values so as to move it left and right sequentially. I want to be able to check what the model's current x position is at any given time, however when I try using   


  in an if statement, it always returns the value that the model was instantiated with.

Is there a way for me to know the model's exact location at any time during its PropertyAnimation?

Hello Thomas,

I am afraid it is not possible to get the model's current position while it is animated. You can refer here to see a list of available methods we have for animated models and if you can use one as a workaround but we do not currently support something like that.



Thanks for the response Eva,.

That's unfortunate, but luckily I found that I was able to replicate the effect of the animation by using JavaScript's setInterval function and now I am able to get the model's position at any time.



Login or Signup to post a comment