My project is all messed up right now so I’m not really sure how to describe this.
I have a Menu scene where you choose a class and chosen class saves an integer. Also button changes scene.
Also there is a LoadGame object with LoadSystem script which loads the saved integer and selects one of the Cinemachines and deactivates other two. So when I select for example “Warrior” in Menu, my 3rd Person Perspective Cinemachine activates and 1st and Isometric Perspective Cinemachines deactivates.
I was working on multiplayer and because I won’t wanna mix up too much things I deactivated LoadGame object. So I can only work on 1st Person Perspective because I was following a “Multiplayer FPS Tutorial”. Everthing were working fine until I have a second player. I made a build and started a host. There were no problems so far.
(Host Alone)
But when run a new “.exe” and start client, Cinemachine flickers and both players focuses on last joined players PlayerArmatureRoot.
(Host on the Left, Client on the Right)
I can control them both seperately, client works as intended, but Host’s view is locked at Client’s view. I know I can move around Host’s PlayerArmatureRoot because gun is child of it. But because Host’s Cinemachine is hooked up to Client’s PlayerArmatureRoot and not Host’s, Host can’t actually look around. For example if I press W from Host in the scenario above, even though host armature itself is “looking” at Client, it will move towards to red wall. Because it is actually looking towards red wall. It is hard to explain as it is hard to understand.
I just followed some simple tutorials. Don’t know much about Unity. Followed tutorials:
Also because I don’t have a character in the hierarchy anymore, I can’t select the Cinemachines in the LoadSystem script. They were embedded into the Player Prefab. If I get them out of prefab I can’t select their “Follow” and “Look At” variables as “PlayerArmatureRoot”.
Any help is appreciated. Thanks.