docs.unity3d.com
    Show / Hide Table of Contents

    Struct KinematicCharacterBody

    A component holding the transient data (data that gets modified during the character update) of the 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 KinematicCharacterBody : IComponentData, IQueryTypeParameter, IEnableableComponent

    Fields

    GroundHit

    The character's detected ground hit

    Declaration
    public BasicHit GroundHit
    Field Value
    Type Description
    BasicHit

    GroundingUp

    The character's grounding up direction

    Declaration
    public float3 GroundingUp
    Field Value
    Type Description
    float3

    IsGrounded

    Whether the character is currently grounded or not

    Declaration
    public bool IsGrounded
    Field Value
    Type Description
    Boolean

    LastPhysicsUpdateDeltaTime

    The last known delta time of the character update

    Declaration
    public float LastPhysicsUpdateDeltaTime
    Field Value
    Type Description
    Single

    ParentEntity

    The character's parent entity

    Declaration
    public Entity ParentEntity
    Field Value
    Type Description
    Entity

    ParentLocalAnchorPoint

    The character's anchor point to its parent, expressed in the parent's local space

    Declaration
    public float3 ParentLocalAnchorPoint
    Field Value
    Type Description
    float3

    ParentVelocity

    The calculated velocity of the character's parent

    Declaration
    public float3 ParentVelocity
    Field Value
    Type Description
    float3

    PreviousParentEntity

    The previous parent entity

    Declaration
    public Entity PreviousParentEntity
    Field Value
    Type Description
    Entity

    RelativeVelocity

    The character's velocity relatively to its assigned parent's velocity (if any)

    Declaration
    public float3 RelativeVelocity
    Field Value
    Type Description
    float3

    RotationFromParent

    The rotation resulting from the parent's movement over the latest update

    Declaration
    public quaternion RotationFromParent
    Field Value
    Type Description
    quaternion

    WasGroundedBeforeCharacterUpdate

    Whether or not the character was considered grounded at the beginning of the update, before ground is detected

    Declaration
    public bool WasGroundedBeforeCharacterUpdate
    Field Value
    Type Description
    Boolean

    Methods

    GetDefault()

    Returns a sensible default for this component

    Declaration
    public static KinematicCharacterBody GetDefault()
    Returns
    Type Description
    KinematicCharacterBody

    HasBecomeGrounded()

    Whether or not the character has become grounded on this frame

    Declaration
    public bool HasBecomeGrounded()
    Returns
    Type Description
    Boolean

    HasBecomeUngrounded()

    Whether or not the character has become ungrounded on this frame

    Declaration
    public bool HasBecomeUngrounded()
    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