Physics Jump-Through

0 favourites
  • 7 posts
From the Asset Store
Jump on alphabets in the proper order and reach the sun!
  • Hi all - I'm making a platformer and it's made entirely out of physics. I have a bunch of background objects which I want the player to be able to run through while at the same time be able to jump ontop of - is there a way to check if the player is above an object and to enable disable collisions accordingly?

    One potential problem is that the objects can be rotated freely, so the 'top' of the object might change.

    All the background objects are part of the same sprite - I've tried a few things with for each and pick all and I just can't work it out.

    My character is set up so that it has a physics base wheel and body and also a 'ground detector'

    I've made a little video showing where it is at currently: [TUBE]yOPZsBr84Us[/TUBE]

    Best,

    Mik

  • I'm not sure exactly how this will play into your physics mechanisms, but the Jump-thru behaviour handles pretty much exactly what you want here. It even accounts for moving/rotated sprites. If you could find a way to make it work with your physics stuff then it might save you a lot of hassle.

    Quick example capx using platform behaviour: right click to rotate the blocks, left click to drag and drop.

  • Well , The logic is simple enough ... Every object below the player should be solid and every object ontop non-solid ... I currently don't have access to C2 , so that's the only thing I can do to help you ...

    Cheers , and Good Luck ...

    Edit : You could place the origin of the player at the bottom of his sprite and the origins of each objects at the top of their respective sprites

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It'll probably be pretty difficult to implement this, but in my mind it's rather unnatural and may feel strange to the player. Just my opinion ;)

  • THanks for the suggestions - I've actually decided it's too complex so have given the objects two states, normal where it ignores collision and active, active state is for when in zero gravity.

    Thanks guys

  • Don't abandon this fast ^^

  • haha it's not that, this way is just better design I think from re-evaluating the problem. It's simpler, which is often better in my experience.

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