pathfinding and bounce makes object disappear

Bugs will be moved here once resolved.

Post » Thu Apr 23, 2015 12:58 am

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).
Posts: 10
Reputation: 272

Post » Wed May 13, 2015 4:29 pm

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).
Scirra Founder
Posts: 25,097
Reputation: 199,802

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests