How do I change direction of a bullet when touching 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.
  • Hi!

    The idea is simple but is giving me headheachs.

    I need the blue arrow to follow the red ones, but once it thouches makes the turn before its supposed. How do I do that?

    I tried different thinks, none worked.

    Because this is supposed to have a lot of levels, I should move the red arrows whatever I want and continue to work as expected.

    Here is the capx:

    https://www.dropbox.com/sh/5hcamahqcypjba0/AADk4wnL2hAZsXbULLr6I4txa?dl=0

    Thans for your help!

    Tuca

  • You can make very small collision polygons on both sprites (blue and red arrows).

    Then collision will happen much closer to their center.

    On collision set Blue arrow position to Red arrow position, and only then change the angle of motion.

  • You can make very small collision polygons on both sprites (blue and red arrows).

    Then collision will happen much closer to their center.

    On collision set Blue arrow position to Red arrow position, and only then change the angle of motion.

    thanks mate, I think this would work well, but my idea is to have fixed blocks also where the blue arrow should stop if clolids. Wha do you think I should do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's hard to tell without knowing more about your game, there are lots of possibilities.

    From what I've seen, Bullet is probably not the best choice here.

    If the game is grid based, maybe instead of collision detection you should scan the Tilemap, look for the tile with Red arrow in the direction of movement. And then use MoveTo behavior to move to that destination tile. Or something like that.

    Or if you want to use Bullet, you can try "System Pick by Overlapping point" event instead "On collision".

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