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

vcam rotation with aim set to do nothing not respond to custom script

Discussion in 'Cinemachine' started by halevi, Jan 19, 2022.

  1. halevi

    halevi

    Joined:
    Dec 13, 2020
    Posts:
    35
    i created two cinemachine vcam's , in the first vcam i defined the aim and body to "do nothing" and in the second vcam i defined the body to "do nothing" and in the aim i defined lookat target , i need the first camera only for blend purpose to blend in certain point to the second camera ,i control on the position and rotation of the first camera directly from custom script,the positening manually of the vcam works great but the vcam not respond to the rotation manually i used vcam.gameobject.transfrom.lookat(somepos) but for some reason the vcam not respond to this, so Is it supposed to work that way even if it is set to aim "do nothing"?there's another better way for what I want to do?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    If you set the vcam's Aim and Body to Do Nothing then you should be able to control the transform from script, just as you would control any transform. There is no special way.
     
    Last edited: Jan 19, 2022
    halevi likes this.
  3. halevi

    halevi

    Joined:
    Dec 13, 2020
    Posts:
    35
    ok thanks,now I noticed it's a line i missed in the code
     
    Gregoryl likes this.