docs.unity3d.com
    Show / Hide Table of Contents

    Struct KinematicVelocityProjectionHit

    Holds the data for hits that participate in velocity projection

    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 KinematicVelocityProjectionHit : IBufferElementData

    Constructors

    KinematicVelocityProjectionHit(BasicHit, Boolean)

    Constructs the velocity projection hit based on a basic hit and grounding status

    Declaration
    public KinematicVelocityProjectionHit(BasicHit hit, bool isGroundedOnHit)
    Parameters
    Type Name Description
    BasicHit hit

    A basic hit

    Boolean isGroundedOnHit

    Whether or not the character is grounded on this hit

    KinematicVelocityProjectionHit(KinematicCharacterHit)

    Constructs the velocity projection hit based on a character hit

    Declaration
    public KinematicVelocityProjectionHit(KinematicCharacterHit hit)
    Parameters
    Type Name Description
    KinematicCharacterHit hit

    A character hit

    KinematicVelocityProjectionHit(float3, float3, Boolean)

    Constructs the velocity projection hit based on a basic hit and grounding status

    Declaration
    public KinematicVelocityProjectionHit(float3 normal, float3 position, bool isGroundedOnHit)
    Parameters
    Type Name Description
    float3 normal

    The hit normal

    float3 position

    The hit point

    Boolean isGroundedOnHit

    Whether or not the character is grounded on this hit

    Fields

    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

    Hit 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
    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