docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CinemachineDeoccluder.ObstacleAvoidance

    Settings for deoccluding the camera when obstacles are present

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    [Serializable]
    public struct CinemachineDeoccluder.ObstacleAvoidance

    Fields

    CameraRadius

    Camera will try to maintain this distance from any obstacle. Increase this value if you are seeing inside obstacles due to a large FOV on the camera.

    Declaration
    [Tooltip("Camera will try to maintain this distance from any obstacle.  Try to keep this value small.  Increase it if you are seeing inside obstacles due to a large FOV on the camera.")]
    public float CameraRadius
    Field Value
    Type Description
    float

    Damping

    How gradually the camera returns to its normal position after having been corrected. Higher numbers will move the camera more gradually back to normal.

    Declaration
    [Range(0, 10)]
    [Tooltip("How gradually the camera returns to its normal position after having been corrected.  Higher numbers will move the camera more gradually back to normal.")]
    public float Damping
    Field Value
    Type Description
    float

    DampingWhenOccluded

    How gradually the camera moves to resolve an occlusion. Higher numbers will move the camera more gradually.

    Declaration
    [Range(0, 10)]
    [Tooltip("How gradually the camera moves to resolve an occlusion.  Higher numbers will move the camera more gradually.")]
    public float DampingWhenOccluded
    Field Value
    Type Description
    float

    DistanceLimit

    The raycast distance to test for when checking if the line of sight to this camera's target is clear.

    Declaration
    [Tooltip("The maximum raycast distance when checking if the line of sight to this camera's target is clear.  If the setting is 0 or less, the current actual distance to target will be used.")]
    public float DistanceLimit
    Field Value
    Type Description
    float

    Enabled

    When enabled, will attempt to resolve situations where the line of sight to the target is blocked by an obstacle

    Declaration
    [Tooltip("When enabled, will attempt to resolve situations where the line of sight to the target is blocked by an obstacle")]
    public bool Enabled
    Field Value
    Type Description
    bool

    MaximumEffort

    Upper limit on how many obstacle hits to process. Higher numbers may impact performance. In most environments, 4 is enough.

    Declaration
    [Range(1, 10)]
    [Tooltip("Upper limit on how many obstacle hits to process.  Higher numbers may impact performance.  In most environments, 4 is enough.")]
    public int MaximumEffort
    Field Value
    Type Description
    int

    MinimumOcclusionTime

    Don't take action unless occlusion has lasted at least this long.

    Declaration
    [Tooltip("Don't take action unless occlusion has lasted at least this long.")]
    public float MinimumOcclusionTime
    Field Value
    Type Description
    float

    SmoothingTime

    Smoothing to apply to obstruction resolution. Nearest camera point is held for at least this long.

    Declaration
    [Range(0, 2)]
    [Tooltip("Smoothing to apply to obstruction resolution.  Nearest camera point is held for at least this long")]
    public float SmoothingTime
    Field Value
    Type Description
    float

    Strategy

    The way in which the Deoccluder will attempt to preserve sight of the target.

    Declaration
    [Tooltip("The way in which the Deoccluder will attempt to preserve sight of the target.")]
    public CinemachineDeoccluder.ObstacleAvoidance.ResolutionStrategy Strategy
    Field Value
    Type Description
    CinemachineDeoccluder.ObstacleAvoidance.ResolutionStrategy

    UseFollowTarget

    Use the Follow target when resolving occlusions, instead of the LookAt target.

    Declaration
    [EnabledProperty("Enabled", "")]
    public CinemachineDeoccluder.ObstacleAvoidance.FollowTargetSettings UseFollowTarget
    Field Value
    Type Description
    CinemachineDeoccluder.ObstacleAvoidance.FollowTargetSettings
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)