Package com.github.stephengold.joltjni
Class CharacterContactSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CharacterContactSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Properties of a character contact that can be overridden during certain
CharacterContactListener callbacks.-
Constructor Summary
ConstructorsConstructorDescriptionCharacterContactSettings(long settingsVa) Instantiate settings with the specified native object assigned but not owned. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether the other object can push the virtual character.booleanTest whether the virtual character can apply impulses to the body.voidsetCanPushCharacter(boolean setting) Alter whether the other object can push the virtual character.voidsetCanReceiveImpulses(boolean setting) Alter whether the virtual character can apply impulses to the body.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
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:
trueif pushing is allowed, otherwisefalse
-
getCanReceiveImpulses
public boolean getCanReceiveImpulses()Test whether the virtual character can apply impulses to the body. The settings are unaffected. (native attribute: mCanReceiveImpulses)- Returns:
trueif impulses can be applied, otherwisefalse
-
setCanPushCharacter
public void setCanPushCharacter(boolean setting) Alter whether the other object can push the virtual character. (native attribute: mCanPushCharacter)- Parameters:
setting-trueto allow pushing,falseto 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-trueto allow impulses,falseto prohibit them (default=true)
-