Physics - platform character

This forum is currently in read-only mode.
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I'm trying to make a physics-focused platformer where the player-character is able to interact with the physics objects. Problem is, the platformer-behavior character doesn't interact with the physics-based objects. Is there any way around this, or is it possible to give a physics-based object a platform-style movement? (I've tried this by adding force, but the player object stops and freezes in place at random moments for no good reason)

  • Yes, it is possible to make a platforming game engine just using physics. See here:

    It takes some work, though. And there are a lot of little things you need to do to tweak it just right.

    What sort of interactions do you need? Perhaps you can fake it with another means. If it's just something like you need the player to thrown a physics-y ball, then that's easy. But if you need lots of movable stuff that pushes the player around then yeah, you'll probably need to ditch Platform and use Physics. Just keep plugging away at it.

    And if you're having trouble with one particular bit, go ahead and post your .cap so someone can take a look. Vague descriptions like "I've tried this by adding force, but it freezes" don't help much.

  • I've managed to get the player character to move left and right, but I'm running into problems with getting it to jump. Is there any way to make a physics object "bounce" upward by, say, adding force in a certain direction? Hope this is a little clearer.

    Thanks!

  • One more question: would it be possible to give a platform object a property that allows it to interact with physics objects? I'm not trying to do anything crazy, just enable the player to move boxes out of the way, for example

  • to jump add action, under the physics tab

    set velocity to -1000

    or

    add force -100000

    those numbers are probably too weak or too strong, and also depend upon your physics settings

    but either one will make an object jump. You can tweak it afterward, but it's a start

    [quote:22weebpp]

    One more question: would it be possible to give a platform object a property that allows it to interact with physics objects? I'm not trying to do anything crazy, just enable the player to move boxes out of the way, for example

    no. unfortunately physics does not work well with other behaviors. You can create an almost perfect replica of platform with physics and events though. And even add your own features

  • I have mixed other behaviors with physics by doing the following:

    A: platform behavior, physics with Inmovable set

    B: solid attribute set, physics with inmovable set

    C: solid attribute set, physics with gravity

    D: physics with gravity

    C and D fall and bounce off B as expected

    A can stand and jump off B as expected

    However...

    A may stand and jump off C but C doesn't react to it

    A doesn't react to D, however D is pushed as if A had infinite mass.

    O_o

    I've used a physics proxy before, but that didn't go so well. You could try it. Or go the all-physics route. They're both hard.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I think you can attach an immovable physics object to a platform object, as a "detector"... Just have to make the immovable physics object always follow the platform object.

    I do believe, though, that this still causes weird glitches and stuff... it's been a long time since I played around with the idea, but I'm fairly certain it works to some degree.

    ~Sol

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