Search Unity

Question Simple Follow With World Up + Transporter won't rotate X offset?

Discussion in 'Cinemachine' started by G-RexSaurus, Mar 22, 2023.

  1. G-RexSaurus

    G-RexSaurus

    Joined:
    May 21, 2022
    Posts:
    30
    I want to create a 3d platformer camera where it follows and rotates where the player direction is and also the player can be able to rotate camera by any axis. However, the only offset camera cannot rotate is X offset, why?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Change the binding mode to WorldSpace.
     
  3. G-RexSaurus

    G-RexSaurus

    Joined:
    May 21, 2022
    Posts:
    30
    But the x offset doesn't rotate where the player's direction should go,

    I want to make my camera rotate where player goes to the direction, it would be easier to see instead of camera just being locked in 0 x-offeset, there should be somekind of binding mode same as simple follow with world up, but also if x offset setting can be modified.

    I also want to make an option where the player can change the camera direction where the player thinks it should be
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I'm a little confused about what you want to do. So far here is what I understand:
    • You want SimpleFollow behaviour, which means that when the player moves, the camera is pulled along like a trailer.
    • You also want the user to be able to reposition the camera by orbiting horizontally
    Question: what should happen when the user rotates the camera to a different place, and then the player starts moving?
     
  5. G-RexSaurus

    G-RexSaurus

    Joined:
    May 21, 2022
    Posts:
    30
    The player would always move in the direction the camera is aimed, I would also add that the player can only change the camera rotation if the player is not moving.

    It would be nice if simple follow with world up,(binding mode) could also be modified with the x Axis
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    If you put OrbitalTransposer instead of Transposer in Body, then it will do what you want.

    upload_2023-3-29_13-33-48.png
     
    G-RexSaurus likes this.
  7. G-RexSaurus

    G-RexSaurus

    Joined:
    May 21, 2022
    Posts:
    30
    That's exactly what I needed, I didn't even though of Orbital Transporter
    My camera movement works now, you have my thanks!