First, I’m using the words ‘cylinder’, ‘tube’ and ‘track’ sort of interchangeably in this post, they refer to pretty much the same thing.
In the game I am making, I have a tube-shaped track (the cylinder mesh). An object will need to travel through this tube with a gravity that is in the local down position of the object, meaning that if it rotates, it can fall towards the “roof” or “walls” of this cylindrical track, so the tube must have collision all around the inside wall. The tube-shaped track may also turn at irregular points at varying rates.
I’m a bit unsure of how I should go along solving this issue. There isn’t any fully cylindrical collider in unity (capsule isn’t optimal), and even if I made one myself, it wouldn’t really help at places where the track bends. I’ve been thinking that a mesh collider may be the only option, but how will this affect performance? In the end, multiple objects may collide with the tube at the same time at different places, and there might end up being a lot of faces on the tube, especially where it bends…
I hope I explained what I’m after somewhat clearly (if not I’ll post a graphical illustration later). Suggestions?