Noob question about Obstacle of Pathfinding behavior

Hello, I’m new to GDevelop. This’s they first time I’m trying to create an indie game by myself so have lots questions to ask.

I’m experimenting a top view game which a character can be moved to eight different angles. I put two rocks in the map and have set their behaviour to Obstacle of Pathfinding. But my character still can pass through them without any block. Could you help me to figure out where I did wrong in setting or is there any thing I missed in the Event Scene.

Thank you!

14


I didn’t includ any event command to the Rocks yet.

Well your character is not using any pathfinding. I think you want a collision to happen, for thqt use the action separate object1 from object2

1 Like

Well your character is not using any pathfinding. I think you want a collision to happen, for thqt use the action separate object1 from object2

Thank you for the quick reply @arthuro555 ! I tried this but not sure if it’s the wrong solution, also doesn’t work.

Could you correct me?

The pathfinding obstacle behavior only works with the pathfinding behavior. In that case, you would click/tap somewhere and Player would go there on his own.

If you want to move with the arrows and avoid the rock, use the separate action, as advised above:

1 Like

Thank you, this works for me! My bad I didn’t understand the same solution provided by Arthuro555.

Also thank you for explaining the pathfinding&pathfinding obstacle for me, I misunderstood the behaviour

However, here I encountered another issue.

My character indeed gets blocked while he’s walking towards the rock, but the blocking area is way bigger than the rock itself. (Like the screenshot bellow, the man is getting blocked there which is far away from rock).

How can I edit it so that the character can only get block when he touches the rock’s edge?

Edit the hitbox in the sprite properties of the rock and of the player.

1 Like

Got it! Thank you so much!