Class RagdollRef

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<ConstJoltPhysicsObject>

public final class RagdollRef extends Ref
A counted reference to a Ragdoll.
  • Method Details

    • addToPhysicsSystem

      public void addToPhysicsSystem(EActivation activation)
      Add bodies and constraints to the physics system and optionally activate the bodies.
      Parameters:
      activation - whether to activate bodies (not null)
    • driveToPoseUsingMotors

      public void driveToPoseUsingMotors(SkeletonPose pose)
      Drive the ragdoll to the specified pose using motors.
      Parameters:
      pose - the desired pose (not null, unaffected)
    • removeFromPhysicsSystem

      public void removeFromPhysicsSystem()
      Remove bodies and constraints from the physics system.
    • setPose

      public void setPose(SkeletonPose pose)
      Alter the ragdoll's pose using the locking body interface.
      Parameters:
      pose - the desired pose (not null, unaffected)
    • setPose

      public void setPose(SkeletonPose pose, boolean lockBodies)
      Alter the ragdoll's pose.
      Parameters:
      pose - the desired pose (not null, unaffected)
      lockBodies - true→use the locking body interface, false→use the non-locking body interface
    • getPtr

      public Ragdoll getPtr()
      Temporarily access the referenced Ragdoll.
      Specified by:
      getPtr in class Ref
      Returns:
      a new JVM object that refers to the pre-existing native object
    • toRef

      public RagdollRef toRef()
      Create a counted reference to the native RagdollRef.
      Specified by:
      toRef in class Ref
      Returns:
      a new JVM object with a new native object assigned