#Hello I have an issue understanding the
1 messages · Page 1 of 1 (latest)
You are going to run into issues trying to use Cinemachine in a server driven way. You would have to send your player inputs in either a Network Variable or a server RPC. The latency alone will cause problems trying to control a camera.
Good to know, so far I think it's still working in client side only because all I've done is put my freelook camera in my prefab and the inputs are handled through the cinemachine input provider
any idea why my script shown above might not work ? If you need more details about what result I'm expecting feel free to ask
Also just a general question but do you know where I could find details about when to use which rpcs ? I've been trying some things out for my player movement but I'm never sure what exactly am I allowed to do and not to do on a client
I've already read the docs which explain what they do but they never really go into detail about when they should be used
clients can only call ServerRPCs. the Server can only call ClientRPCs. The host is both a client and a server so it can call both
so in a situation where I want to move my player would directly changing it from the client without using a serverRPC only make it move for the clients and not sync with the server or would it just not allow it at all ?
If you use a regular Network Transform it will not move at all
Client Network Transform is the opposite. Only the owner can move in that case
ohhhh so the fact that the transform wouldn't move was because of the network transform
yup
I though ngo automatically handled what kind of things were allowed to be changed from client/server by not changing them at all when it was unauthorized
so stuff like enabling/disabling components I need to do both on the server and the clients correct ?
it's not automatically synced or whatever right ?
Right. that's not synced
wait now that I think about it how come when I enabled my collider from the editor as the host it enabled it for the clients then ?
did it not enable it at all and it just synced the transform ?
to give more context I disabled my components (collider included) by default and made the clients enable it when they owned the object but they still fell through the ground
Collider should have still been disabled. the network transform kept it in place
and even if they enabled it locally I'm guessing since the transform was synced on the server where it was disabled it would have made them fall through the ground anyway right ?
using Network transform, yea
ok that makes a lot of sense thank you
just one last question if you don't mind : I'm using a network transform and a network rigidbody on my player, does that mean that from the clients both the transform and the rigidbody are read-only and I need to go through the server to change their values ?
yep. even further, the rigidbody will be set to kinematic on the clients
Oh so it only gets changed by the server then I get it