Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

How do I stop the Transposer from following its target when in the dead zone?

Discussion in 'Cinemachine' started by Kev00, Oct 11, 2017.

  1. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    Is there a way to stop the Transposer from following its target when the target is in the dead zone of the composer?

    The reason I'm asking is that I'm trying to implement a camera for a movement selector. The position of the movement selector is controlled by mouse movement via ray casting.

    The problem is that as the camera moves so does the mouse and this causes the movement selector to constantly move across the screen. Adding damping makes the problem less pronounced but it doesn't solve it.

    Any insight you might have would be appreciated.

    Thanks
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    406
    Good question!
    The transposer is missing the concept of a deadzone, and has no specific knowledge of the Composer's settings.
    On the other hand, the Framing Transposer has an integrated position/composition deadzone. Might it be a good choice for this virtual camera?
     
  3. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    I'm not seeing the Framing Transposer. Is that a script? The documentation doesn't mention it.

    Thanks
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    406
  5. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    thanks... I downloaded it and installed it. I can wait to give it a try. I just have to figure-out why I'm getting all these invalid references to "GetSetAttribute", MinAttribute.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    406
    Try deleting the old CM install before installing the new one. The Unity package mechanism isn't very good at cleaning up deleted files
     
  7. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    Thanks for your help. I managed to get it working.

    The Framing Transposer is what I was looking for. :)

    Now, all I need to do is add rotation and zooming functionality.. I suppose that's at least another virtual camera. I'll have to update its position to match the Framing Transposer camera when I switch over to it, but shouldn't be too hard.

    hmm.. maybe the orbit cam can simply follow the Framing Transposer camera at 0 distance.
     
  8. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    Now that I'm using the Framing Transposer, it looks like I have the opposite problem . :( I need to rotate around the movement selector and prevent re-positioning of the camera while in the dead zone of the Framing Transposer.

    Since translation and rotation must occur at the same time (using the keyboard and mouse). I can't simply switch between virtual cameras.

    I guess its still a question of what camera I need to script manually.
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    406
    I think I need to better understand exactly the camera behaviour you want. Maybe there's a way to get it that we'll see if we step back a little. I'm having a hard time picturing what you're looking for.
     
  10. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    Let me explain a bit more. I have a movement selector that is controlled by the mouse. I'm now using the Framing Transposer with a large dead zone and an unlimited soft zone. This works very well, but I need to find a way to orbit around the movement selector (via keyboard input) at the same time. Orbiting around the center of the screen is another option.

    orbitaroundmovementselector.PNG
     
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    406
    Since the Framing Transposer's angular relationship to the lookAt target is defined by its transform's rotation, you could rotate around it just by modifying the Y rotation of the vcam. You could easily make a little script to do that
     
  12. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    74
    Thanks, I decided to write my own custom orbit cam script and attach it to a Virtual Camera.