why does the ball keep going trough the solids?

  • Whenever I apply force (multiple times 2/3 fast click) towards one of the corners of the screen the ball keeps getting out of the layout even though it has a solid in its way.

    I have 3 walls (left, right, up) and I am trying to make the ball bounce off when in collision with them.

    + Touch: On tap gesture

    -> player: Apply Physics impulse 200 at angle angle(Touch.X,Touch.Y,player.X,player.Y) at image point 0

    + player: On collision with Sprite

    -> player: Set Bullet Enabled

    -> player: Bounce Bullet off Sprite

    -> System: Wait 0.00001 seconds

    -> player: Set Bullet Disabled

  • Sute

    You should avoid mixing Physics with other behaviors (Solid, Bullet, Pin, Platform etc.)

    Ideally Physics objects can only interact with other Physics objects, otherwise you can get all kinds of weird and unexpected results.

    So instead of solid use Immovable, instead of Bullet use physics actions like "apply force" or "set velocity" etc.

    If you only need physics to "kick" the ball, use Bullet behavior instead, with gravity, negative acceleration and "bounce off solids".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I agree with dop2000, you can't (or shouldn't) use both physics and solids behaviors, as the physics behavior is designed to only interact with objects that share the physics behavior.

    For what you're describing, I would recommend something along the lines of custom movement, and simulate controls, or maybe even applying the platformer behavior to the ball, disabling the behavior and scripting out simulated controls to Jump at the desired times, say, on collision with.

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