I am currently almost done with some 3d levels and I have been planning on creating my own collision system for my level and models, and I was wondering: what makes collision good? I have played and seen allot of games where collision just seems to fall apart, people walking through walls, ghosting through doors, ect. Since I want to design my own collision scripts I want to know what are some good practices for making sure things don’t break. I have seen many games this just seems to fall apart. I get it would make sense for an online game but there are a lot of games (which are not online based) where players can easily take advantage of things like this and I don’t want this to happen to mine. I was hoping I could get on track to developing a good system with some pointers and documentation on how it’s done. I also want my character to try to fall through objects as little as possible like during rag doll effects. (Seamless collision I suppose?) It might be math oriented I know but can someone point me in the direction of designing good/professional collision?
( this may or may not belong in the physics section but since I am scripting one from scratch I’m not sure)
Off the top of my head, here are a few DO NOT do’s:
- Using more than one mesh collider (excluding convex). They don’t collide with each other, though this is not always obvious.
- Setting transform.position instead of using the Rigidbody to move it.