Class Corpse

java.lang.Object
net.risingworld.api.objects.Corpse

public final class Corpse extends Object
Representing a dead body.
  • Constructor Details

    • Corpse

      protected Corpse(long handle)
  • Method Details

    • isValid

      public boolean isValid()
    • destroy

      public void destroy(boolean fade)
    • getCorpseType

      public Corpse.CorpseType getCorpseType()
    • getPosition

      public Vector3f getPosition()
    • setPosition

      public void setPosition(Vector3f position)
      Sets the position of the corpse.
      Parameters:
      position - the new position.
    • setPosition

      public void setPosition(float x, float y, float z)
      Sets the position of the corpse.
      Parameters:
      x - x coordinate (horizontally).
      y - y coordinate (vertically).
      z - z coordinate (horizontally).
    • getRotation

      public Quaternion getRotation()
    • setRotation

      public void setRotation(Quaternion rotation)
      Sets the rotation of the corpse.
      Parameters:
      rotation - the new rotation.
    • setPositionAndRotation

      public void setPositionAndRotation(Vector3f position, Quaternion rotation)
    • applyPhysicalImpulse

      public void applyPhysicalImpulse(Vector3f impulse)
      Applies a physical impulse to the corpse (applied to the center).
      Parameters:
      impulse - the impulse you want to apply to the corpse.
    • applyPhysicalImpulse

      public void applyPhysicalImpulse(Vector3f offset, Vector3f impulse)
      Applies a physical impulse to the corpse (applied to the position defined by the local offset).
      Parameters:
      offset - the local offset (relative to the corpse center) where the impulse should be applied.
      impulse - the impulse you want to apply to the corpse.