Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Why my character Controller of capsule will tilt when using CinneMachine(virtual)

Discussion in 'Cinemachine' started by unity_408540137, May 15, 2023.

  1. unity_408540137

    unity_408540137

    Joined:
    Oct 23, 2022
    Posts:
    44
    Hi, I have learning to use character controller to move a capsule.

    And I have a weird problem in using Chinnemachine to rotate camera.

    The problem is when I turn to left or right of my capsule, the capsule won't tilt

    But When I move straight to foward or backward, my capsule will tilt as the file of photos attached in this article.

    I can't figure out what is going on here? """Turning to the right or left won't tilt, but forward or backward will tilt.?

    Does anyone encounter the same problem?

    By the way I use the follwoing scripts to make my capusle to rotate.
    Quaternion freeRotation = Quaternion.LookRotation(lookRotation,Vector3.up);
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    If lookRotation is not parallel to the plane, then the capsule will tilt. This is not related to Cinemachine.
     
    Last edited: May 15, 2023
    unity_408540137 likes this.
  3. unity_408540137

    unity_408540137

    Joined:
    Oct 23, 2022
    Posts:
    44
    OK thanks I will try to find the answer