how can i get object position in realtime if i set object linear velocity ? help
i dont do much with physics so this may not work but try creating a function that is called from an enterFrame eventListner then in that function put something like objectX,objectY = object.x, object.y
To add on to what @jstrahan said, when ever you need to know the objects location, be it in a enterFrame listener or in some other part of your code, its .x and .y will be it’s current location regardless of what is moving it.
Rob
i dont do much with physics so this may not work but try creating a function that is called from an enterFrame eventListner then in that function put something like objectX,objectY = object.x, object.y
To add on to what @jstrahan said, when ever you need to know the objects location, be it in a enterFrame listener or in some other part of your code, its .x and .y will be it’s current location regardless of what is moving it.
Rob