Possible to find the Display x/y of a physics body?

For a physics body, I can get the x/y which I believe are its World coordinates. However, what if I want to get it’s coordinates on the Display itself, between 0,0 and 480,320 (for example)?

It this possible? [import]uid: 85633 topic_id: 15084 reply_id: 315084[/import]

have a look at the contentToLocal and the localToContent functions, are they what you are after?

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15084 reply_id: 55789[/import]

Terrific! localToContent did the trick.

I have a body in the physics world, and I needed to know where it appeared on the actual screen in terms of which “section” of the screen it was in, left side, top, right side, bottom.

So, the body was added in the displayGroup “thegroup” as “thebody”

This is what worked:

local x\_local, y\_local = thegroup:localToContent(this.thebody.x, this.thebody.y)  
-- x\_local and y\_local were the screen coordinates of the body  

I really appreciate how everyone here is so helpful. [import]uid: 85633 topic_id: 15084 reply_id: 55812[/import]