- Home /
Unet remoteclient rigidbody physics
Alright so basically I'm working on my own little multiplayer project, the current method by which I'm running the characters is a rigid body system. Anyways the problem is that in order to have collision on the character I have to have the rigid body enabled, but that makes the remote client bug out and push away, cause the clients and servers are having issues with where the character is supposed to be. Because of the way I do stuff like lerping movement and animations I need the rigidbody enabled, if its not enabled the remote clients characters wont have collisions, and if the movement is frozen they simply wont move. Essentially I need a way to make the current player, collide with other characters but not have his physics affect other players movement.
You could add an second TRIGGER collider to your player (yes an object can have two colliders like that), and change the colliders on the objects you want to detect collisions with, but not bounce off of, into trigger colliders. "Trigger" colliders will enable collision detection in code, but NOT use rigid body physics upon collision. Both colliding objects must have a non-trigger collider to "bounce".
I'm not sure if this will solve your overall issue, but this is how I would detect collisions without physics.
@Glurth All right I'll try this tomorrow (just got in from work), and let you know how it goes.
Eh that didn't work, at least not the way I tried to implement it, thanks anyways, I'm gonna keep trying other ways.
Is there any reason you can't use a character controller? It also sounds like you may be attempting to move the player on both the client and the server. You should have "local player authority" set to true on the player's NetworkIdentity component, so that the server will not override the player's movements.
Yea I got the local player authority set that's not the problem, as for character controller, I honestly for some reason was a dumb-ass when I programmed the movement and decided that using physics for it was a better idea, at this point I may just rebuild the entire thing cause the style of game I'm building has absolutely no need for that type of movement.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
UNET Network Transform Component lags 2 Answers
best way to make a multiplayer physics heavy game (3000+ rigidbodys) 2 Answers
Networked Physics 0 Answers
Changing rooms and spawning players with Multiplayer Example 2 Answers