#Physics based movement
1 messages ยท Page 1 of 1 (latest)
@indigo ether
UI start connection
this should be all the code. if you need more on the prefabs, let me know @indigo ether
simple player and camera prefabs. with network object, transform, rigidbody on the player and object and transform on the camera
Going to eventually have a camera controller code that is separated from the movement controller, but will be dependant on the player's movement controller.
Join this channel to get access to perks:
https://www.youtube.com/channel/UCDxBnVVue5zxsmzpaDIB92g/join
only difference from this video and the code is movement to the fixed update, but the same kind of issue occurs
@indigo ether any suggestions?
Not really. Try simplifying the player movement. If it's server authoritative, I'm not sure why you have clientRPCs there. Network Transform and network Rigidbody should take of that for you. Something seems like it's fighting with the physics
Client RPC is just for sending back the direction the player last faced, so that when a player stops moving in a direction for the third person point of view, they continue to face that direction. The other client RPC is for retreiving the player's camera object from the server, because they are instantiated separate from each other.
It was going to be also for client prediction and server reconcilliation, as well, but if I can't get server movement to work, there's no point in that.
it's "complicated" because the camera is server authoritative as well, but that part is also pretty smooth, so the issue isn't with complexity, there's something going on with the physics. on the rigidbody and collisions.
I did also do this with moveposition, and that worked, but caused the players to phase through the ground at points when their movement was fast...