Jumping with physic

  • Hello, since just now I'm stuck on something. Indeed I use physics to make my platform game, but the problem is that the player jumps to infinity. I try to make a collision condition with the ground, but as I have several types of soil it may take a long time to do, is there another solution please? Thank you

  • Hello,

    Maybe you should provide a small capx. As of now it's hard to solve your problem. Jumping with physics should be made by applying an impulse at an angle pointing upward, assuming you set a gravity different than 0.

  • Good evening,

    Yes the jump works very well, but the problem is that in the air the player jumps too, I want that when he is on the ground he can jump but not when he is in the air

  • Good evening,

    Yes the jump works very well, but the problem is that in the air the player jumps too, I want that when he is on the ground he can jump but not when he is in the air

    You can set a condition to that..

    You are probably using something like:

    On Tap or On Key -> Jump

    Just add togheter the condition Is on floor (maybe you will have to add the platform behaviour to the player)

  • Yes but I have several floors that's why I do not want to do 40 conditions

    I do not use the platform engine I use the physics engine only

  • Yes but I have several floors that's why I do not want to do 40 conditions

    I do not use the platform engine I use the physics engine only

    You do not need 40 conditions, you can use a family and set your conditions on it.

  • How to use a family?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You will see a folder on C2 named 'Families', right click and go to add family

    Now add all the platform or objects that you want to have same conditions/actions.

    After that use a name to identify this family, now, on Event Sheets you will be able to make conditions/actions for the whole family. You don`t need to put a condition/action to each object, just place it on the same family.

    Edit: And you can also have variables/behavious/effects for the whole family, it will activate it to each object on the family.

  • This will not impact the performance of the game?

  • Im not sure, maybe Ashley can answer that.

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