Interface ConstCharacterBase
- All Superinterfaces:
Comparable<ConstJoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Subinterfaces:
ConstCharacter,ConstCharacterVirtual
- All Known Implementing Classes:
Character,CharacterBase,CharacterRef,CharacterVirtual,CharacterVirtualRef
Read-only access to a
CharacterBase. (native type: const
CharacterBase)-
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the maximum slope the character can walk on.Return the body ID of the supporting surface.Access the material of the supporting surface.Return the normal direction at the point of contact with the supporting surface.Return the location of the point of contact with the supporting surface.Return the relationship between the character and its supporting surface.Identify the face on the supporting surface where contact is occurring.longReturn the user data of the supporting surface.Return the world-space velocity of the supporting surface.getShape()Access the character's shape.getUp()Return the character's "up" direction.booleanisSlopeTooSteep(Vec3Arg normal) Test whether the specified normal direction is too steep.booleanTest whether the character is supported.voidsaveState(StateRecorder recorder) Save the character's state to the specified recorder.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
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
nullif none
-
getUp
Vec3 getUp()Return the character's "up" direction. The character is unaffected.- Returns:
- a new direction vector
-
isSlopeTooSteep
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
Save the character's state to the specified recorder.- Parameters:
recorder- the recorder to save to (not null)
-