Stop the sprite when it hits a solid object.

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hey guys,

    I'm trying to achieve this (sorry about the glitch)

    I want to stop the object when it hits a solid while it's going forward/backward or rotating.

    I tried to use 8 Direction and Car behavior but they don't work so I tried Custom Movement.

    This is what I achieved so far it's almost same as Car behavior.

    Is there any way to make this movement in C2? I thought it's an easy thing to do before I start. I still can't believe how hard it is

    Thank you!

  • Try adding an event that goes something like either one of these

    On collision with wall.object -->

    Set Tank speed to 0

    wait 1-2 secs

    Set Tank speed to (normal speed) or play around with acceleration

    or maybe even better

    On collision with wall.object -->

    start ignoring input

    wait 1-2 secs

    stop ignoring input

    just test it and see what works best and tweak it from there

    hope that helps

  • mystazsea Thank you for replying!

    I figured out how to make it. I added 4 sprites every corner of the tank and check their collisions separately.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bilgekaan, you don't need placeholders, you can use the checking overlapping at offset instead and you'll improve your performance, because placeholders increase significantly the number of collision checks. I'm working in a sandbox of my template where I was using placeholders and now it's all checking with offset, the improvement is huge.

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