Hey,

Through quite a lot of testing, I finally found the problem.

If you add a "PolyNavObstacle" script to an object which already has a shape, it will act like in the video in my post.

I tried removing the spriterenderer, it didn't work. But if I create an empty sprite (GameObject->Create Other->Sprite), and add a PolyNavObstacle, it works as intended, BECAUSE it has no sprite attached to it, therefore no shape.



Sorry if that wasn't clear enough, tried my best =[

Anyways, do you have to use polygoncolliders? Why can't you just use any collider?

Collider2D collider; if(collider == null) collider = GetComponent<Collider2D>(); //in PolyNavObstacle.cs



Another thing; in C# the default access modifier is private, so you don't have to type private. however, you do have to type public! That means you have to add 'public' before the "invertPolygon" variable in polynavobstacle.



Hopefully you find a fix for this, I'll try to look a bit, but I have other things to do.

Thanks for the support,

- Andrew

Click to expand...