- Home /
Collision between CharacterControllers on Network
I'm working on a p2p multiplayer game that has characters with CharacterControllers. I'm having issues where if both characters run at each other, one will end up jumping extremely high in the air or over the other character's head. When one character is not moving and the other is moving, the CharacterControllers' colliders worked fine. I've read in a few places that I should add another collider, which I tried on the characters, but no luck. Has anyone tried to use CharacterControllers with a multiplayer game, and if so, how'd you get collision to work? Any advice would be wonderful, this puts a damper on continuing the game >_<
Things like this are why I gave up on CharacterControllers a long time ago...
Yeah... I wish we could. We have a whole character setup that was meant for single player that my manager wants for multiplayer, which has the charactercontroller. It doesn't really translate to multiplayer very well -_-
Could you do something like put a manual proximity check in to make sure the players aren't trying to walk through each other? Avoid the problem by not letting them ever touch?
So almost like a radius around a player and checking if anyone is in that bubble? Hmm, that's a good suggestion. It sounds just like what a collider should do in this case but colliders are failing. I'll look into it.
I think this idea would work better if it were not for networking. Something tells me it's going to be a bit funky because the dummy is interpolating another character. But, I could be wrong ._.
Answer by lizzyCTS · Nov 01, 2011 at 10:07 PM
So credits to Syclamoth, I ended up doing a proximity check on dummy characters. I made an arraylist that kept track of the other players and checked if they were too close or not. If they were too close, I didn't let the dummy player update it's position or rotation. It causes a little bit of a lag (well it looks like lag, but it's a teleport) when characters run into each other. That's sure a whole lot better than flying in the air randomly. It's a shame no matter what I tried with colliders, it was an epic fail!