Search Unity

Need some help with third person camera

Discussion in 'Cinemachine' started by marconi9331, Nov 27, 2019.

  1. marconi9331

    marconi9331

    Joined:
    May 14, 2018
    Posts:
    3
    Hello everyone

    I'm fairly new to cinemachine and may not be using cinemachine correctly, but I'm having some issues with it I'm trying to make a third person camera system like in horizon: zero down, the free camera orbiting the player was quite straight forward, but when it comes to the shoulder camera I can't seem to get it working, fiddled with some options and got really close now but it seems the cinemachine collider dont work properly with the cinemachine offset component it looks like it start the raycast from the camera position without considering offset so it wont collide with the level properly any ideas on how to fix that?

     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Can you try with the script execution order to make CinemachineCameraOffset happen before CinemachineCollider?
     
  3. marconi9331

    marconi9331

    Joined:
    May 14, 2018
    Posts:
    3
    Tried that and after some adjusting some values its working great thanks for the help ;) , but just to clarify something all cinemachine componets will execute in the inspector order then?
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    No, not inspector order. This:

    upload_2019-12-3_8-51-33.png
     
  5. marconi9331

    marconi9331

    Joined:
    May 14, 2018
    Posts:
    3
    ok never knew that existed to be honest but did try to reorder but after hitting apply they vanish from the list, tried with other scripts and it stayed in place, I'm using HDRP preview so it might be a bug maybe?
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    ahhh, it could be that the metafiles are read-only because it's a package :-/
    As a workaround, you could try copying CinemachineCameraOffset to your assets, renaming so that it's a new custom extension, and then you should be able to add it to the execution order. Use your new extension in the place of the old one.