Search Unity

Cinemachine Lock on system

Discussion in 'Cinemachine' started by yepyea69, Feb 11, 2020.

  1. yepyea69

    yepyea69

    Joined:
    Nov 17, 2019
    Posts:
    1
    Howdy peps

    As the title explains I'm trying to create a Cinemachine Lock-on system with the free look cam, Originally based on the dark souls lock on but with more research any good Thrid person melee game has a lock-on system.

    To get to the point all I want it to do is to switch the LookAt component to the selected game object when the player presses tab (Input is already sorted don't need help there), But for some reason this somewhat simple thing I want is forbidden knowledge.

    I would add code if I got anywhere besides the basic set up.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,394
    If you change the LookAt target of a vcam, it will snap to the new configuration, not blend. If you want it to blend, you have to create a second vcam with the new LookAt target and then activate it to blend to it, and deactivate it to blend back. Be sure to check the "Inherit Position" checkbox to minimize axis movement.

    upload_2020-2-19_14-48-23.png
     
unityunity