Camera and position problems

When I add MultiplayerSynchronizer the host character spawns normally but the client character somehow spawns outside of level bounds (around 1k pixels on the X axis given that my screen and level are around 500pixels wide) and keeps falling, and both client and host are following the client camera. Once I close the client window the host camera returns to the proper player.

I didn’t use the course version of the camera setup, I just placed it in the player scene. It’s both easier and in prior projects I had trouble with camera positioning in low resolution settings if I change the position by code (the pixels visibly stutter) while if I just place it in player scene it works just fine.

Is it possible to make such a camera setup work for multiplayer? How do I change the active camera of a client?

I’d say follow the courses version of the camera and then try to modify from there, I haven’t toyed with it too much to give a definiteive answer on changing or deviating from the course itself but there’s always more than one way to do something :slight_smile:

2 Likes

Just a thought: have you tried lerping? Or setting the Drag in the camera’s inspector?

Im getting similar,
when the client Spawns in, it drops in at the point, but pings it out of bounds,
after a little messing I found it was moving it to 0,0 in the world.

if I remove the MultiplayerSync, on the host it arrives in the correct place, but the client still hops to 0,0

the only thing I changed was the camera bounds, so once I removed them, thats how I found it was going to 0,0 as I always use 0,0 as the top left corner of my levels.
Im going to re-watch the lecture, incase I missed something, but so far Ive tried changing from position to global_position, and its not made any change.

Please do tell when you find a solution

I’ll try that when I get some time to return to the course and tell if it worked

1 Like

I think this is the solution:

not tried it yet

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms