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<ConstJoltPhysicsObject>
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, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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:
- 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)
-