What am I doing wrong with my (not) impassable objects?


#1

Excuse the marbled “blocks”! I am trying (unsuccessfully so far) to block off the areas she can’t walk on. The background images are 2d, so I can’t have her walking over walls or anything! So far, she is just walking right over the “impassable obstacles”. The character originally started with just “top down movement” behavior, but now I have added “pathfinder”, as well as put pathfinder obstacle/impassable object on the block, but again, it’s not working so far. Any hints? And when I finally get the collisions right, can i just “hide” the obstacles from view?


#2

I get the feeling you’re not using the pathfinding behaviour as intended. It’s for NPCs - you don’t control the object that has the pathfinding behaviour. It gets updated automatically. The pathfinding obstacles are only for the function that calculates the path and only avoids blocks when the ‘Move to position’ action is used. It doesn’t prevent a player character from going over them. You’ll need to use the collision events and move away from actions to control that.

And yes, if you hide an object, it just doesn’t get displayed. It’s still there and collide-able, but just isn’t rendered to the screen.

[ de-ja-vu :smiley: ]


#3

Just in case anyone else has a similar problem, this was solved. Here’s the link, at the bottom.