pathfinding and bounce makes object disappear

0 favourites
  • 2 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Problem Description

    When an object bounces while following a path, it vanishes.

    Attach a Capx

    I am not allowed to post links

    but you can take off the space from fr/public/speed0Bounce.capx

    Description of Capx

    the file shows 2 sprites colliding and bouncing while one follows a path and has a bullet speed of 0.

    One sprite disappears.

    Steps to Reproduce Bug

      Two sprites sprite 1 and sprite 2 have bullet behavior. Sprite1 has pathfinding behavior. There is an event that makes Sprite 1 and Sprite2 bounce off each other on collision. At start, Sprite 1 sets its bullet speed to 0, and disable its bullet behavior (last step is optional). He then finds a path to sprite2 and follows it. On collision between sprite1 and sprite2, sprite1 disappears.

    Observed Result

    Sprite 1 vanishes, its X and Y are NaN, making it invisible on screen.

    Sprite1 keeps on following a path endlessly.

    Expected Result

    Sprite 1 should not disappear. This does not happen with the parameter "bounce off solid", only with an event with "bounce off object". This also happens with bullet disabled.

    If you disable "set speed to 0" in the file, it does not happen anymore even though bullet is disabled.

    I think that it should work like with "bounce off objects" parameter on (bouncing is ignored in this case).

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Win7 SP1

    Construct 2 Version ID

    latest (r203).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix, you are using two behaviors which are conflicting with each other. Bullet and Pathfinding will be trying to tug the object in different directions and it's not surprising if this breaks. Avoid using more than one movement behavior at a time (if you must, only enable one at a time).

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