r/oculusdev • u/PCouture • Apr 29 '22
Right way to setup world/wall collision in Unity
Hello,
I have a basic world inside a sphere I've been working on the basics of Unity programming. I'm trying to prevent the player from falling out of the edge of the world and have put up Mesh Colliders as walls around the sphere.
I'm wondering if that is the best solution or if I should be looking at another direction. Surprisingly there is little documentation on it.
5
Upvotes
3
u/theBigDaddio Apr 30 '22
Don’t use mesh colliders, use primitives. I use box for walls and floors etc. the simplest mesh collider is basically more intensive than multiple primitives.
2
u/[deleted] Apr 30 '22
Stop looking for “best” solutions because that is a never ending rabbit hole. If your solution works for your purposes do that. As you build your world and gain more experience you’ll be get the knowledge to know if something needs to be changed. If your solution works then it works, if you find out there is an easier better way later than just replace them. You’ll probably end up rebuilding whatever it is you are making countless times anyway.