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 TypeMethodDescriptionboolean
Test whether the other object can push the virtual character.boolean
Test whether the virtual character can apply impulses to the body.void
setCanPushCharacter
(boolean setting) Alter whether the other object can push the virtual character.void
setCanReceiveImpulses
(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, 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:
true
if 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:
true
if 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
-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)
-