Hello, I am currently working on implementing A* pathfinding for enemies in a 2D platformer. For the most part, everything seems to function properly, except the enemy itself will fall through the level geometry. The enemy object’s rigidbody2D is kinematic (it has to be for the gravity to work the way it’s intended) and the level uses an edge collider 2D and a polygon collider 2D. The enemy uses a capsule collider 2D. I’ve been using the documentation (https://arongranberg.com/astar/docs/pathfinding2d.html) but nothing I change seems to make a difference. Any help would be appreciated, and thanks in advance!
Hi
A kinematic rigidbody is not affected by forces generated by the physics engine, so you probably should not make it kinematic if you want it to hit colliders.
Also note that platformer pathfinding is not something explicitly supported by this package, even though it is possible to do a lot of things with point graphs and grid graphs to an extent.