Search Unity

Bug Feedback Loop in Rotation with Cinemachine

Discussion in 'Prefabs' started by KingKyukuro, Aug 29, 2023.

  1. KingKyukuro


    Aug 15, 2021
    I am Creating a Multiplayer game in Unity using Mirror. Recently I finished making my Character Selector and implemented a Basic character.
    My issue is that now, the Rotation of the Camera controls the Rotation of my PlayerObject, under which the CharacterHolder (In which is the Camera) is a Child too, leading it to rotate more, and create infinite rotation.
    Since I have multiple Characters that I need to Spawn/Destroy when they are swapped from, the Camera's are Children to the Main Player Object inside the Prefab.
    I was looking for any Ideas on how I could solve this Issue, I tried only rotating the PlayerModel but that sadly creates a lot of other Issues and using a Inversed rotation to even out the Rotation on the Camera makes snap backwards, feel very junky and overall gives it a low-frame rate feeling to it.
  2. Gregoryl


    Unity Technologies

    Dec 22, 2016
    One way to address this is to have the player and the camera be siblings under a common child in your prefab.