Class CharacterContactSettings

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CharacterContactSettings
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public final class CharacterContactSettings extends JoltPhysicsObject
Properties of a character contact that can be overridden during certain CharacterContactListener callbacks.
  • Constructor Details

    • CharacterContactSettings

      public CharacterContactSettings(long settingsVa)
      Instantiate settings with the specified native object assigned but not owned.

      For use in custom contact listeners.

      Parameters:
      settingsVa - the virtual address of the native object to assign (not zero)
  • Method Details

    • getCanPushCharacter

      public boolean getCanPushCharacter()
      Test whether the other object can push the virtual character. The settings are unaffected. (native attribute: mCanPushCharacter)
      Returns:
      true if pushing is allowed, otherwise false
    • getCanReceiveImpulses

      public boolean getCanReceiveImpulses()
      Test whether the virtual character can apply impulses to the body. The settings are unaffected. (native attribute: mCanReceiveImpulses)
      Returns:
      true if impulses can be applied, otherwise false
    • setCanPushCharacter

      public void setCanPushCharacter(boolean setting)
      Alter whether the other object can push the virtual character. (native attribute: mCanPushCharacter)
      Parameters:
      setting - true to allow pushing, false to prohibit it (default=true)
    • setCanReceiveImpulses

      public void setCanReceiveImpulses(boolean setting)
      Alter whether the virtual character can apply impulses to the body. (native attribute: mCanReceiveImpulses)
      Parameters:
      setting - true to allow impulses, false to prohibit them (default=true)