E
erryox
Guest
Hi there,
I decided to try to make a game with physics, and I can not solve one problem. Next a lot of text, I hope everything is clear explained Just trying to describe everything in detail.
If two objects of the floor are placed closely, which are physical objects. And on them goes the player's object with a square collision mask. That is quite often the player object clings to the corner.
With fixed blocks I solved the problem by combining them into one fixture. But with moving objects are more difficult:
In fact, the surface is above horizontal. Tilt due to view_angle.
I even tried to turn off gravity. Objects should not touch each other. But the player still clung to the corners.
Then I noticed that the coordinates phy_position_y, as well as the angle of phy_rotation, are almost never constant and deviate to small values, something like this:
Apparently the point is this. But how to fix it, I have no idea.
I changed the size of the collision mask to half a pixel, this reduced the probability of a bug several times. But still I want to eliminate this possibility completely.
I decided to try to make a game with physics, and I can not solve one problem. Next a lot of text, I hope everything is clear explained Just trying to describe everything in detail.
If two objects of the floor are placed closely, which are physical objects. And on them goes the player's object with a square collision mask. That is quite often the player object clings to the corner.
With fixed blocks I solved the problem by combining them into one fixture. But with moving objects are more difficult:
In fact, the surface is above horizontal. Tilt due to view_angle.
I even tried to turn off gravity. Objects should not touch each other. But the player still clung to the corners.
Then I noticed that the coordinates phy_position_y, as well as the angle of phy_rotation, are almost never constant and deviate to small values, something like this:
Apparently the point is this. But how to fix it, I have no idea.
I changed the size of the collision mask to half a pixel, this reduced the probability of a bug several times. But still I want to eliminate this possibility completely.