0 Favourites

Issues with physics and platform

  • Hi everyone!

    This is a little prototype that i'm work on:

    decodeweb.com.br/newgame

    The black box is the player; yellow box is a boudingbox with physics applied in; and the blue one is a box, with physics.

    The problem is: sometimes, when the player is pushing the blue box, it passes through the box, even when the floor is rect.

    Whats the problem?

    Thanks for the help! (sorry for my bad, bad english :P).

    Capx file: dropbox.com/s/tnkmsluzgqnbw1m/new_game-2ecely359k9od.capx

  • Anyone?

  • I'll just make it simple.

    Don't mix platform and Physics.

    This is a mistake that most new C2 users make when wanting to get both the platformer toolkit and the physics toolkit. The problem is that Physics uses Box2D which is NOT part of the platformer kit. Box2D is it's own API entirely and does not play nice with Platformer.

    You can mix them, but the grief it will cause you a lot of grief trying learn the in's and outs of handling both.

    If you want Physics. Then you drop Platformer and have your player also a Physics object. You won't get the nice triggers, but it will work the way it should.

    If you can sacrifice physics. Then I suggest dropping that.

    If you want both. it's going to be a lot of work. The reason for this is because Physics objects shuold be moved by physics controls. So even layering a physics object on the player will be problematic as Platformer would be setting the position of the physics object. This will cause Physics behaviour issues and not a desired effect.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I see. Im already awareness of this issue. Because of this, I'm trying to use a "boudingbox" around the player. Player have the PLATFORM behavior, while this "boundingbox" have the PHYSICS one.

    Then, i "stick" both together, to make physics interations with world (like pull/push crates, even in a inclined surface).

    If you check the little prototype at decodeweb.com.br/newgame you will see what is the problem. When I try to push the box, the box moves. But sometimes, it "passes" through it, specially when you pushes from right.

    If I use only the physics in objects, the same problem occurs. The Capx file is in the first post.

    Thanks for the help!

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