Having a small problem while polishing the TileVania game. Some of my goobers get stuck on ladders and hazards. Does anyone know why this might be or how I can fix it? I’ve tried extending the reverse-periscope and making the circle collider smaller…
Hi JitteryGames,
The first thing I would do is to check the collider shapes of the tilemap. Unfortunately, the tilemap collider component often generates “wrong” shapes. That has been a known issue in Unity for years. If the colliders look strange, disable the tilemap collider component and enable it again. That usually forces Unity to recalculate the shape(s).
If the issue with the goobers getting stuck persists, add a few Debug.Logs to your code to figure out when exactly the goobers get stuck. If you recognise a pattern, you will be able to fix it, so try to gather as much relevant information on the situation as you can. Also make assumptions and try to verify/falsify them such as: “When my goobers are stuck their collision method gets called once per frame, which makes them stuck.”
Let me know what you figured out.
I had overlap with my circle collider it wasn’t liking. Moved it further away and made it longer. Fixed the issue.
Good job!
I personally just moved the ladders to a different layer that doesn’t have collision with the enemies. You might want to consider this if you have any more problems with this.
The collisions were already off.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.