sorbias's Forum Posts

  • Oh, i forget to mention another problem:

    I need to use really big physic forces to prevent the character getting stuck into the other objects. That is good in some cases, but when he "runs" against some obstacle, he actually can stay in the air, because the physic is pushing him against of the obstacle and prevents the gravity get him down. What should i do with that? Add some timer to the "run" button, or is there any way to slowly fade the physic force out if he keeps pressing the button, so he falls down slowly?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you a lot about taking time to help me. When i get home, i will test that velocity thingy.

    Dummy object is also very clever, but i think it would not work, because there is also physic objects that would also need their own dummy objects and it would be little overkill.

  • I am trying to do a game that has physics and you play with a character that needs to push and avoid getting killed by physics objects. Character is controlled by buttons that will apply some physic forces to left or right, or up (jump)

    The problems:

    How do I detect when the character is again back on ground after jump, so i can prevent him jumping (flying) with the physics before he is back?

    I need something like "if character is colliding with another physics object, enable jump, else disable it".

    And then: "if character is moving after jump to direction y at any speed, enable double jump. else disable it."

    Now i have done it with timer. Character can jump only once / 1 second, but its not best solution to this. And because every force has an equal opposite force, i made it like when player clicks jump button, my character first does physics force 300 to angle 90, then waits 0,1 second and does physics force 300 to angle -90. This works very well, except when he is in air when player clicks the jump button. Then the character fast moves down, that is not good thing.

    I hope someone understood what i am trying to do.