0
votes

While initializing scene I enable physics debug draw using:

getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);

Then I add a sprite with physics body and add the sprite to the scene. Then I move the scene, f.e. by doing the following in the scene init method:

this->runAction(MoveBy::create(2, Vec2(200, 0)));

As a result I get incorrect behavior of physics debug objects - all the children of the scene move correctly except physics debug figures. I've captured video of what's happening: https://streamable.com/hd6yz

Thank you!

1

1 Answers

0
votes

Found workaround for this issue, I've created additional layer and added all the children from the scene to this layer and added this layer in its turn to the scene. Now I move only this layer, not the scene. Physics debug figures are rendered correctly, though there must be more convenient way to fix it.