Interface ConstCharacter

All Superinterfaces:
Comparable<ConstJoltPhysicsObject>, ConstCharacterBase, ConstJoltPhysicsObject
All Known Implementing Classes:
Character, CharacterRef

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

    • getBodyId

      BodyId getBodyId()
      Return the ID of the body associated with this character. The character is unaffected.
      Returns:
      a new ID
    • getCenterOfMassPosition

      RVec3 getCenterOfMassPosition()
      Return the location of the rigid body's center of mass using the locking body interface. The character is unaffected.
      Returns:
      a new location vector (in system coordinates)
    • getCenterOfMassPosition

      RVec3 getCenterOfMassPosition(boolean lockBodies)
      Return the location of the rigid body's center of mass. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a new location vector (in system coordinates)
    • getLayer

      int getLayer()
      Return the character's object layer, using the locking body interface. The character is unaffected.
      Returns:
      a layer index (≥0)
    • getLayer

      int getLayer(boolean lockBodies)
      Return the character's object layer. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a layer index (≥0)
    • getLinearVelocity

      Vec3 getLinearVelocity()
      Copy the linear velocity of the character using the locking body interface. The character is unaffected.
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getLinearVelocity

      Vec3 getLinearVelocity(boolean lockBodies)
      Copy the linear velocity of the character. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getPosition

      RVec3 getPosition()
      Copy the location of the character using the locking body interface. The character is unaffected.
      Returns:
      a new location vector (in system coordinates)
    • getPosition

      RVec3 getPosition(boolean lockBodies)
      Copy the location of the character. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a new location vector (in system coordinates)
    • getPositionAndRotation

      void getPositionAndRotation(RVec3 storeLocation, Quat storeOrientation)
      Copy the position of the associated body using the locking body interface. The character is unaffected.
      Parameters:
      storeLocation - the desired location (in system coordinates, not null, unaffected)
      storeOrientation - the desired orientation (in system coordinates, not null, unaffected)
    • getPositionAndRotation

      void getPositionAndRotation(RVec3 storeLocation, Quat storeOrientation, boolean lockBodies)
      Copy the position of the associated body. The character is unaffected.
      Parameters:
      storeLocation - the desired location (in system coordinates, not null, unaffected)
      storeOrientation - the desired orientation (in system coordinates, not null, unaffected)
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
    • getRotation

      Quat getRotation()
      Copy the orientation of the character using the locking body interface. The character is unaffected.
      Returns:
      a new rotation quaternion (in system coordinates)
    • getRotation

      Quat getRotation(boolean lockBodies)
      Copy the orientation of the character. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a new rotation quaternion (in system coordinates)
    • getWorldTransform

      RMat44 getWorldTransform()
      Calculate the character's local-to-system coordinate transform using the locking body interface. The character is unaffected.
      Returns:
      a new coordinate transform matrix
    • getWorldTransform

      RMat44 getWorldTransform(boolean lockBodies)
      Calculate the character's local-to-system coordinate transform. The character is unaffected.
      Parameters:
      lockBodies - true→use the locking body interface, false→use the non-locking body interface (default=true)
      Returns:
      a new transform matrix