RESOLVED: display the object's center in group

If the object is added to a group, and then move the group then the center of the object will not display correctly. And not shifted physics joint objects - physics.newJoint

local physics = require("physics") physics.start() physics.setDrawMode("hybrid") local main = display.newGroup() local obj = display.newRect(200,200,50,50) physics.addBody(obj,"static", { density = 0.1, friction = 0.8, bounce = 0}) main:insert(obj) main.x = 100

Hi @GamingStudio17,

Which build are you seeing this in? If I recall a similar report from a week ago, it doesn’t actually affect the physics behavior, correct? Only the hybrid/debug view mode? And only when you move groups around?

Thanks,

Brent

2091, yes it doesn’t actually affect the physics behavior only the hybrid/debug view mode and only when you move groups around. Still unpleasant.

You cannot move objects once they are added to the Physics simulation. You can only move them in ways that don’t break the Physics simulation, e.g. forces, touch joints, etc). 

In your example above, you are implicitly moving the object by moving its parent group, so that causes the positions in the Box2D simulation to differ from where Corona thinks it should draw them.

Hi @GamingStudio17,

Which build are you seeing this in? If I recall a similar report from a week ago, it doesn’t actually affect the physics behavior, correct? Only the hybrid/debug view mode? And only when you move groups around?

Thanks,

Brent

2091, yes it doesn’t actually affect the physics behavior only the hybrid/debug view mode and only when you move groups around. Still unpleasant.

You cannot move objects once they are added to the Physics simulation. You can only move them in ways that don’t break the Physics simulation, e.g. forces, touch joints, etc). 

In your example above, you are implicitly moving the object by moving its parent group, so that causes the positions in the Box2D simulation to differ from where Corona thinks it should draw them.