- Home /
Are Character Controllers inefficient?
I read somewhere that there should not be more than 1 active Character Controller in a scene at a time.
Would I be alright using 4 Character Controllers at a time?
I'm making a multiplayer 2D platformer and I'm using Rigidbodies for character movement. Everything is fine except for one problem, when you fall from a high jump, the character goes into the ground a little bit reducing the player's forward momentum. Character Controllers do not have this problem when I use them (I believe it's due to the different way Character Controllers handle collision detection).
I'd prefer to stick with the rigidbodies, so if anyone has a solution to the "entering the ground for a frame" problem that'd be awesome.
What collision Detection method are you using on your rigidbody?
The options are: Discrete, Continuous, and Continuous Dynamic.
Continuous Collision Detection might help you with that issue. Dynamic seems unneeded for a situation such as this.
@$$anonymous$$uuskii: that's not how it works...if you're going to use continuous on an object, you need continuous dynamic if it moves, and continuous for any non-moving objects that the continuous dynamic object should collide with. Unless you have issues with extremely fast objects "teleporting" straight through colliders, you should not use continuous dynamic since it's very CPU-intensive.
@Eric5h5 Good to know. So you're suggesting that changing the Detection $$anonymous$$ethod is actually a suboptimal solution?
If you don't actually need Continuous for the reason I specified above, then it's best to avoid it.
"the character goes into the ground a little bit reducing the player's forward momentum"
one very simple tip, make sure the collider of your ground is very thick - I mean deep. it should extend, unseen, many meters in to the center of the earth :)
Answer by Eric5h5 · Oct 10, 2012 at 04:04 AM
Decrease the min penetration for penalty in the physics settings; also try increasing the solver iteration count.
I had already tried everything mentioned including messing with the Fixed Timestep, which helped, but did not fix it. I'm really at a loss here. How does the Character Controller detect collision? Perhaps I can just write my own character controller.