docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CinemachineDecollider.DecollisionSettings

    Settings for pushing the camera out of intersecting objects

    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 CinemachineDecollider.DecollisionSettings

    Fields

    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

    Enabled

    When enabled, will attempt to push the camera out of intersecting objects

    Declaration
    [Tooltip("When enabled, will attempt to push the camera out of intersecting objects")]
    public bool Enabled
    Field Value
    Type Description
    bool

    ObstacleLayers

    Objects on these layers will be detected.

    Declaration
    [Tooltip("Objects on these layers will be detected")]
    public LayerMask ObstacleLayers
    Field Value
    Type Description
    LayerMask

    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

    UseFollowTarget

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

    Declaration
    [EnabledProperty("Enabled", "")]
    public CinemachineDecollider.DecollisionSettings.FollowTargetSettings UseFollowTarget
    Field Value
    Type Description
    CinemachineDecollider.DecollisionSettings.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)