Moving pinned obstacles breaks pathfinding example

Bugs will be moved here once resolved.

Post » Wed May 22, 2013 9:04 pm

Link to .capx file:
https://www.dropbox.com/s/iio9gk9dm2b9y10/brokenpathfinding.capx

Steps to reproduce:

1. Modify pathfinding example:
2. Put a new sprite big enough to hold all obstacles outside the viewport
3. Move all obstacles on top of this sprite
4. Add pin behaviour to obstacles
5. On start of layout pin all obstacles to this sprite
6. Add a button somewhere in the viewport
7. Add a condition if this button gets clicked:
8. then move new sprite into the viewport
9. run layout and click button

Observed result:

Pathfinding example does not work any more

Expected result:

Pathfinding should work. (well, I assume, because everything works fine when the obstacle holder sprite gets moved on start of layout)

We have a lot of smaller objects - specifically spaceships - with some bots working on them. These bots should move along predefined pathes.

We do not want to put each spaceship into a separate layout since we do not want to copy all the same interface elements and other game objects too.

Also we want to maintain state information without using save behaviour, etc. Having all ships in the same layout but outside the viewport also allows us to switch between all ships instantly and there is no delay caused by loading gfx.

Also and most importantly we want to be able to move ships without breaking pathfinding. (not at the same time when bots move of course)

(Please note: I observed a similar issue when rotating pinned objects. After stopping rotation of the host object and unpinning attached objects, these objects do not feature the correct angle any more. They got somehow resetted to their original angle before rotating, when you access Angle property but display looks okay...)

Could you please help me with this issue since it is crucial to our project at the moment.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:

Construct 2 version: 126
    alexd2013-05-22 22:20:54
B
3
Posts: 3
Reputation: 206

Post » Wed May 22, 2013 10:51 pm

Add a "Regenerate Obstacle map" action after having moved the obstacles.

Not a bug but a user/code mistake.

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed May 22, 2013 11:13 pm

Thank you very much for your quick answer.
B
3
Posts: 3
Reputation: 206


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests