Physic, Polygons, Collisions

0 favourites
  • 2 posts
  • Greetings Constructors,

    First, I didn't post this subject in the How do I section because according to me, it's more a general question about the overall functioning of Construct 2 and its physic behaviors than a simple request for help. I don't really need help anyway (although your replies on this topic could be of use, of course). If I'm wrong and this subject belongs to the How do I section, sorry, I'll respost it there and delete this one. That's being said, let's get back to the real topic : PPC (Physic, Polygons, Collisions).

    Under precise conditions, the little armless dummy that I use as main character/sprite can go through the platforms around him. The player's sprite overlaps the platform's sprites while the collisions are disabled. It works efficiencly without any problem when doing any vertical movements, however, I've noticed that it may causes some odd stuff when doing any horizontal movements. I may precise that I use Chipmunk physic behavior, and not the basic physic behavior.

    To be clear, when jumping through a platform above or beneath him, everything is fine.

    When running through a platform however, I have seen three main cases :

    1) The character is slowing down (like he was suddenly going through some kind of big water wall or something) but manage to pass

    2) He remains stuck in the middle of the platform (pretty rare tho, but fact is, it happens over time)

    3) Collisions are still enabled when running directly toward a platform, but they are not if I jump through it

    It's pretty odd, as in the event sheet I specify that under the concerning circunstances, the collisions don't apply what's going on exactly ? I was sure the character will just run like nothing was there anymore, the sprite being drawn but physically inexistant. I was wrong, but why ? Also, if I suppose we can't change anything in the behavior to fix this mess, I'm sure there is a tricky way to avoid that thanks to the events, but I have no idea how, honestly. Any ideas ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No idea. Assuming the chipmunk behavior is the only behavior on the object then it should be fine. Chipmunk objects collisions depend on the collision group, shape, and layers. The sprite action to disable collisions does nothing for the behavior. If the objects are going relatively fast and the the objects are thin then they could pass through each other since the chipmunk physics library doesn't do continuous collision detection.

    Also if the collision polygon is concave then it gets split into multiple convex ones. Not sure if that would cause an issue. The collision response in the physics library is done by pushing convex polygons out of each other.

    Other than that the behavior just converts c2 positions to physics sim positions and back, and the physics library does the rest.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)