Physics Groups Behavior

I have a physics group called ground.  This physics groups provides a floor, ceiling, and walls to enclose a user controlled car.  I have several objects in very specific locations with relation to this ground group.  Most of these objects are sensors.  I want to be able to rotate the ground group and keep all objects in their specific location with relation to ground.  So, if ground rotates, so too does each object while staying in their relational location.  

I’ve tried grouping the objects into another group, but the physics bodies do not like that.  

I’ve also tried rotating the entire sceneGroup, but that also rotates gravity with it and throws the camera out of wack.  

I’m thinking finding a relational algebraic equation to constantly update each objects x, y, and rotation is probably the answer… but I haven’t given up on groups, so I haven’t gone down that rabbit hole just yet.

The reason I think groups are still in play is because everything rotates fine when I rotate the sceneGroup, so I’m probably not grouping things in the correct order.  I’ve tried multiple different grouping orders, but still no luck. 

If anyone out there has any suggestions, I’d be very appreciative.  

You can’t rotate groups of physics objects by using a parent group. All physics bodies have a reference point of 0,0 based at the top left of the screen. Putting them in a group and moving the group changes the reference point of the display objects but not the physics objects attached to the display objects.

You will need to move the physics bodies individually.

>>everything rotates fine when I rotate the sceneGroup

everything EXCEPT physics, that is – that’s why your gravity then appears rotated also.

rotating (or translating, scaling) a group is like moving a camera  - it’s visual only, and does not affect physics’ model of the world.

(or as an analogy, just imagine twisting your hand while holding your phone running your app – physics’ gravity will still point “world-down” even if the bottom of your phone points off to the side, same w rotated groups)

to rotate bodies relative to the world will require actually rotating those bodies, not just their display.

You can’t rotate groups of physics objects by using a parent group. All physics bodies have a reference point of 0,0 based at the top left of the screen. Putting them in a group and moving the group changes the reference point of the display objects but not the physics objects attached to the display objects.

You will need to move the physics bodies individually.

>>everything rotates fine when I rotate the sceneGroup

everything EXCEPT physics, that is – that’s why your gravity then appears rotated also.

rotating (or translating, scaling) a group is like moving a camera  - it’s visual only, and does not affect physics’ model of the world.

(or as an analogy, just imagine twisting your hand while holding your phone running your app – physics’ gravity will still point “world-down” even if the bottom of your phone points off to the side, same w rotated groups)

to rotate bodies relative to the world will require actually rotating those bodies, not just their display.