I’m using fishnet but that’s mostly irrelevant. I have a logical conundrum.
I have physics-based player controllers. These sorts of controllers do not like stairs or inclines or little bumps in the ground, but I have a simple solution: the floor has no collision for the player. Instead, the player raycasts downward and gets the ground and has a little box collider it puts at the ground. This stays flat at all times and lerps up and down for smooth bumps and stairs.
However I have networking and multiplayer. So I have players on the player physics layer, and then the floor colliders on their physics layer. And the player layer of course collides with the floor layer. But, I don’t want other people’s floor colliders to collide with anyone else because you could get a little wonkiness when dropping on someones head or creating a phantom overhang. Yes I can make the colliders small, but this has it’s own issues when the connection isn’t great. I can’t have everyone turn off everyone else’s colliders because then everyone is going to think everyone else should be falling through the floor all the time.
You’ve created a bigger problem by poorly solving a totally unrelated problem with a terrible solution.
Just design your worlds with proper colliders. Static world colliders offer a measure of guaranteed state between users and that simplifies all problems. You have no need for all this weirdness, it’ll just get weirder if you continue to hack around the problems you’re creating for yourself.
Your advice would be helpful if my game was taking place in a desert or the future in spongebob. But I’m moving a rigidbody using AddForce() and I have to make a capsule move up stairs and ramps, jump across moving platforms, and go over collider seams.
That’s kind of the problem. If you want a character controller that works alright, you cannot use a dynamic rigidbody to drive its motion. It ought to be a kinematic character controller UNLESS you actually want that wonky feel with quirky issues.
If you use a dynamic body you’ll allow the physics engine to drive the motion, you give up control because every tiny pebble with a collider and body will affect the character controller’s forces. This is almost always entirely undesirable … again, unless you want that wonky feeling of the likes of couch coop party games where players try to grab and push each other without really being in control of the motion.
Even arcade racers use kinematic controllers, whereas the realistic car physics controllers tend to be really, really elaborate down to the point of implementing their own physics solver. In between, there’s the “physics uncanny valley” of wonky, wobbly, sluggish feel when you try to let the player control an actual dynamic rigidbody.