Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Angle threshold before rotating,Yawing or pivoting the body with Lock to target camera on Transposer

Discussion in 'Cinemachine' started by DrakaniJp, Jan 5, 2018.

  1. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
    Hi!
    I am working on a fully traversable game in which the player can walk on walls and roofs.

    Is there a way to put a threshold angle before Pitching, Yawing and rolling the body on the transposer that is locked on target?

    I want to avoid excessive camera movement that leads to motion sickness in the game.

    Thank you in advance!!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    There is no built-in angular dead zone, but you might be able to fake it with a hidden target that has a behaviour to implement the angular dead zone. You could also try pumping up the angular damping.
     
  3. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
    Thank you very much for the fast answer! :)
    Another question! :D

    When I use the cinemachine collider and go straight into a wall the camera jumps forward and I can see through it. how can I avoid this? :)
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Can you show me your vcam and collider inspectors, and maybe a picture of the scene showing the problem? It's hard to visualize exactly what's happening.
     
  5. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
  6. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Thanks for this images, but not being familiar with your game I still can't tell what's happening. What do you mean by "in front of a wall"? Maybe you can show me a top-down orthographic scene view, with the camera, target, and wall clearly visible?

    You can just paste images directly here in the forum.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Yes, those are better. What is the "Reticule" object in the LookAt target? Can you show me that in the scene hierarchy? Where is it in space relative to the follow target?
     
  9. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Are you ok with the collider ignoring all obstacles within 22m of the target? Seems a bit heavy-handed to me.
     
  11. DrakaniJp

    DrakaniJp

    Joined:
    Aug 12, 2016
    Posts:
    7
    It is enough to avoid getting inside the walls so, I guess it works :)

    I am still having a little problem with the cam following the target on the x-axis though. our player changes normal and so the position of the target changes very fast not even allowing to use the dampening settings of the cam.

    I am trying to find a fix for that now
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    @DrakaniJp Let me know if you need specific help with this. You'll have to show me some more pictures (or movies) so I can understand the problem.