Making a 2D platformer game using cocos2d-x v3.17.2 (chipmunk) physics.
Encountered a problem related to changes in the level size.
When the scale of the visual world changes, the scale of the physical world does not change.
When the scale of the game level decreases, the characters keep their correct positions, but they move quickly around the map.
If the level scale increases, the characters slow down.
The velocity of the physical body for the character does not change, and the speed of movement the image in pixels increases.
For example, in Box2d, I did not have such a problem with scaling the game level.
In addition, in Box2d, you can set coordinates for images based on the coordinates of physical bodies.
Also, when changing the position or scale, there is a problem with raycast
I solve it by sending coordinates in the physical world, taking into account the shift and scale. And that’s fine with me.
But when scaling the level, the only thing I was able to do was scale all the heroes velocity and gravity of the physical world.
This is not the right approach at all, and I would like to find the right solution to this problem. Can you suggest a solution to my problem?