Collision among kinematic-dynamic-static body that hangs sim

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

Collision among kinematic-dynamic-static body that hangs sim

Postby aclaveri » Mon Mar 26, 2018 8:01 pm

I really appreciate if any of you can help me with this issue in my game or give an advice.

I have a kinematic body moving upwards (my camera is always following this body) and many static bodies scattered on the level-screen (I'm developing a Top-Down game).

Then, I have a character, which is a dynamic body, moved around by the player (using touch events). This character can collide with this kinematic body and with the static bodies.

My problems is, when the main character get stuck between both (kinematic and static -like a sandwich-) the physics simulation "hangs" (in Android and in the desktop version).

When I said "hang" I meant to say that the simulation becomes extremely (but extremely) slow and I have to kill the process. I guess the problem is the high number of collision events triggered.

How can I detect this behavior and what can I do to prevent it? I'm using libgdx, box2d with a contactListener to detect collisions.


libgdx version: 1.9.8
Sorry I'm still learning english ;)
Posts: 4
Joined: Thu Oct 30, 2014 2:01 am

Return to General Development

Who is online

Users browsing this forum: No registered users and 1 guest