In my game, I have set up splines that the player can grind along as rails. I have created a script that takes the data from each of the splines and draws a mesh collider based on their shape that acts as a trigger to mount the rail.
This is the best option for me, as it allows the players to create their own rails and saves me and my team time placing the rails without spending ages placing primitive mesh colliders along the spline.
The only problem I have with this system is that Unity doesn’t allow me to have concave colliders as triggers, which means that I can only have convex colliders encompassing all of my rails. This is ok for things like this:
But if I want complex and curvy rail systems …it comes out like this:
Obviously, there is no way that I can use this in my game.
Is there any way that I can get a concave mesh to act as a trigger -that doesn’t involve me spending money on an asset, or using an older version of Unity?
If not, are there any workarounds?
Thanks in advance.