docs.unity3d.com
    Show / Hide Table of Contents

    Struct KinematicCharacterProperties

    Component holding general properties for a kinematic character

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.CharacterController
    Syntax
    [Serializable]
    public struct KinematicCharacterProperties : IComponentData, IQueryTypeParameter

    Constructors

    KinematicCharacterProperties(AuthoringKinematicCharacterProperties)

    Constructs the runtime properties component based on authoring data

    Declaration
    public KinematicCharacterProperties(AuthoringKinematicCharacterProperties forAuthoring)
    Parameters
    Type Name Description
    AuthoringKinematicCharacterProperties forAuthoring

    Fields

    DecollideFromOverlaps

    Enables detecting and solving overlaps

    Declaration
    public bool DecollideFromOverlaps
    Field Value
    Type Description
    Boolean

    DetectMovementCollisions

    Enables detecting and solving movement collisions with a collider cast, based on character's velocity

    Declaration
    public bool DetectMovementCollisions
    Field Value
    Type Description
    Boolean

    DetectObstructionsForParentBodyMovement

    Enables doing a collider cast to detect obstructions when being moved by a parent body, instead of simply moving the character transform along

    Declaration
    public bool DetectObstructionsForParentBodyMovement
    Field Value
    Type Description
    Boolean

    DiscardMovementWhenExceedMaxIterations

    Whether we should reset the remaining move distance to zero when the character exceeds the maximum collision iterations

    Declaration
    public bool DiscardMovementWhenExceedMaxIterations
    Field Value
    Type Description
    Boolean

    EnhancedGroundPrecision

    Computes a more precise distance to ground hits when the original query returned a distance of 0f due to imprecisions. Helps reduce jitter in certain situations, but can have an additional performance cost. It is recommended that you only enable this if you notice jitter problems when moving against angled walls

    Declaration
    public bool EnhancedGroundPrecision
    Field Value
    Type Description
    Boolean

    EvaluateGrounding

    Enables detecting ground and evaluating grounding for each hit

    Declaration
    public bool EvaluateGrounding
    Field Value
    Type Description
    Boolean

    GroundSnappingDistance

    Distance to snap to ground, if SnapToGround is enabled

    Declaration
    public float GroundSnappingDistance
    Field Value
    Type Description
    Single

    KillVelocityWhenExceedMaxIterations

    Whether we should reset the velocity to zero when the character exceeds the maximum collision iterations

    Declaration
    public bool KillVelocityWhenExceedMaxIterations
    Field Value
    Type Description
    Boolean

    Mass

    The mass used to simulate dynamic body interactions

    Declaration
    public float Mass
    Field Value
    Type Description
    Single

    MaxContinuousCollisionsIterations

    The maximum amount of times per frame that the character should try to cast its collider for detecting hits

    Declaration
    public byte MaxContinuousCollisionsIterations
    Field Value
    Type Description
    Byte

    MaxGroundedSlopeDotProduct

    The max slope angle that the character can be considered grounded on

    Declaration
    public float MaxGroundedSlopeDotProduct
    Field Value
    Type Description
    Single

    MaxOverlapDecollisionIterations

    The maximum amount of times per frame that the character should try to decollide itself from overlaps

    Declaration
    public byte MaxOverlapDecollisionIterations
    Field Value
    Type Description
    Byte

    ProjectVelocityOnInitialOverlaps

    Enables doing an extra physics check to project velocity on initial overlaps before the character moves. This can help with tunneling issues when you rotate your character in a way that could change the detected collisions (which doesn't happen if your character has an upright capsule shape and only rotates around up axis, for example), but it has a performance cost.

    Declaration
    public bool ProjectVelocityOnInitialOverlaps
    Field Value
    Type Description
    Boolean

    SimulateDynamicBody

    Enables physics interactions (push and be pushed) with other dynamic bodies. Note that in order to be pushed properly, the character's collision response has to be either "None" or "Raise Trigger Events"

    Declaration
    public bool SimulateDynamicBody
    Field Value
    Type Description
    Boolean

    SnapToGround

    Enables snapping to the ground surface below the character

    Declaration
    public bool SnapToGround
    Field Value
    Type Description
    Boolean

    Methods

    ShouldIgnoreDynamicBodies()

    Whether or not dynamic rigidbody collisions should be enabled, with the current character properties

    Declaration
    public bool ShouldIgnoreDynamicBodies()
    Returns
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023