[SOLVED] Sprite through walls ...

This forum is currently in read-only mode.
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Hello community, I have a problem with the game I'm developing right now.

    When I run the hero (sprite + 8 movements Behavior + drop shadow effect, collision per pixel) to a right angle represents a wall (sprite attribute + solid), forcing a little, he crosses the wall ...

    Excuse me for my English is not very good.

    Thank you in advance!

  • Yes, because the way frame rate is handled it's possible to miss a collision when the frame rate changes..

    Your best bet is to not allow the player to continuously run into the wall.

    Something like:

    sprite on collision with wall

    ->sprite (8direction) bounce.

    That or make the walls bigger.

  • That's what I finally did but it looks risky collisions when the hero has to maneuver in an emergency or spend some door ...

  • Try using custom movement's 'push out' action.

  • Unfortunately it does not work ...

  • You could try overlap at offset, with set speed.

  • I tried various things with the "at offset overlapping" but I'm not sure I understood what you advice me, you can be more specific?

  • Basically, you can slow it down before it hits the object.

    Warning "OR" is somewhat buggy, but it seems to work fine in this case.

    + Sprite2: overlaps "Solid" : offset (-5,0)

    + System: OR

    + Sprite2: overlaps "Solid" : offset (5,0)

    + System: OR

    + Sprite2: overlaps "Solid" : offset (0,5)

    + System: OR

    + Sprite2: overlaps "Solid" : offset (0,-5)

    -+ System: Trigger once

    --> Sprite2: Set speed to 10

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not work .... The hero slowed, but if the player continues to force on the right corner of the wall, it disappears ...

  • 5 things you could try-

    1, Make your walls a bit thicker.

    2, Place an overlapping dummy wall (invisible and wider than your normal wall on top.

    3, Check the collision mode your player is using.

    4, Use Time Delta in your events.

    5, Slow the player down

    Good luck

  • It's good, I have the solution! It was the "sprite angle Towards mouse X.Y" that was the problem!

    I created a sprite invisible in the corner with a variable on / off feature that turns off when the hero is over.

    Warm thank you to everyone for your help!

    But we'll meet again soon as I open this not a new topic with another very mysterious problem.

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