Interface ConstCharacterBase

All Superinterfaces:
Comparable<ConstJoltPhysicsObject>, ConstJoltPhysicsObject
All Known Subinterfaces:
ConstCharacter, ConstCharacterVirtual
All Known Implementing Classes:
Character, CharacterBase, CharacterRef, CharacterVirtual, CharacterVirtualRef

public interface ConstCharacterBase extends ConstJoltPhysicsObject
Read-only access to a CharacterBase. (native type: const CharacterBase)
  • Method Details

    • getCosMaxSlopeAngle

      float getCosMaxSlopeAngle()
      Return the maximum slope the character can walk on. The character is unaffected.
      Returns:
      the cosine of the slope angle
    • getGroundBodyId

      BodyId getGroundBodyId()
      Return the body ID of the supporting surface. The character is unaffected.
      Returns:
      a new ID
    • getGroundMaterial

      ConstPhysicsMaterial getGroundMaterial()
      Access the material of the supporting surface. The character is unaffected.
      Returns:
      a new JVM object with the pre-existing native object assigned, or else null
    • getGroundNormal

      Vec3 getGroundNormal()
      Return the normal direction at the point of contact with the supporting surface. The character is unaffected.
      Returns:
      a new direction vector (in system coordinates)
    • getGroundPosition

      RVec3 getGroundPosition()
      Return the location of the point of contact with the supporting surface. The character is unaffected.
      Returns:
      a new location vector (in system coordinates)
    • getGroundState

      EGroundState getGroundState()
      Return the relationship between the character and its supporting surface. The character is unaffected.
      Returns:
      an enum value (not null)
    • getGroundSubShapeId

      SubShapeId getGroundSubShapeId()
      Identify the face on the supporting surface where contact is occurring. The character is unaffected.
      Returns:
      a new ID
    • getGroundUserData

      long getGroundUserData()
      Return the user data of the supporting surface. The character is unaffected.
      Returns:
      the 64-bit value
    • getGroundVelocity

      Vec3 getGroundVelocity()
      Return the world-space velocity of the supporting surface. The character is unaffected.
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getShape

      ConstShape getShape()
      Access the character's shape. The character is unaffected.
      Returns:
      a new immutable JVM object with the pre-existing native object assigned, or null if none
    • getUp

      Vec3 getUp()
      Return the character's "up" direction. The character is unaffected.
      Returns:
      a new direction vector
    • isSlopeTooSteep

      boolean isSlopeTooSteep(Vec3Arg normal)
      Test whether the specified normal direction is too steep. The character is unaffected.
      Parameters:
      normal - the surface normal to test (not null, unaffected)
      Returns:
      true if too steep, otherwise false
    • isSupported

      boolean isSupported()
      Test whether the character is supported. The character is unaffected.
      Returns:
      true if supported, otherwise false
    • saveState

      void saveState(StateRecorder recorder)
      Save the character's state to the specified recorder.
      Parameters:
      recorder - the recorder to save to (not null)