docs.unity3d.com
    Show / Hide Table of Contents

    Struct KinematicCharacterHit

    Data representing a detected character hit

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.CharacterController
    Syntax
    [Serializable]
    [InternalBufferCapacity(0)]
    public struct KinematicCharacterHit : IBufferElementData

    Fields

    CharacterVelocityAfterHit

    The character's velocity after velocity projection on this hit

    Declaration
    public float3 CharacterVelocityAfterHit
    Field Value
    Type Description
    float3

    CharacterVelocityBeforeHit

    The character's velocity before velocity projection on this hit

    Declaration
    public float3 CharacterVelocityBeforeHit
    Field Value
    Type Description
    float3

    ColliderKey

    Hit collider key

    Declaration
    public ColliderKey ColliderKey
    Field Value
    Type Description
    ColliderKey

    Entity

    Hit entity

    Declaration
    public Entity Entity
    Field Value
    Type Description
    Entity

    IsGroundedOnHit

    Whether or not the character would consider itself grounded on this hit

    Declaration
    public bool IsGroundedOnHit
    Field Value
    Type Description
    Boolean

    Material

    The hit physics material

    Declaration
    public Material Material
    Field Value
    Type Description
    Material

    Normal

    Hit normal

    Declaration
    public float3 Normal
    Field Value
    Type Description
    float3

    Position

    Hit point

    Declaration
    public float3 Position
    Field Value
    Type Description
    float3

    RigidBodyIndex

    Hit rigidbody index

    Declaration
    public int RigidBodyIndex
    Field Value
    Type Description
    Int32

    WasCharacterGroundedOnHitEnter

    Whether or not the character was grounded when the hit was detected

    Declaration
    public bool WasCharacterGroundedOnHitEnter
    Field Value
    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