-
Have seen: characterContactListener.OnContactSolve = (character, bodyID2, subShapeID2, contactPosition, contactNormal, contactVelocity, contactMaterial, characterVelocity, newCharacterVelocity) => {
// Don't allow the player to slide down static not-too-steep surfaces when not actively moving and when not on a moving platform
character = Jolt.wrapPointer(character, Jolt.CharacterVirtual);
contactVelocity = Jolt.wrapPointer(contactVelocity, Jolt.Vec3);
newCharacterVelocity = Jolt.wrapPointer(newCharacterVelocity, Jolt.Vec3);
contactNormal = Jolt.wrapPointer(contactNormal, Jolt.Vec3);
if (!allowSliding && contactVelocity.IsNearZero() && !character.IsSlopeTooSteep(contactNormal)) {
newCharacterVelocity.SetX(0);
newCharacterVelocity.SetY(0);
newCharacterVelocity.SetZ(0);
}
} Want to know how to get Does something like Ideally, I'd like to be able to extract these values (once) during each timestep in our sim. |
Beta Was this translation helpful? Give feedback.
Answered by
jrouwe
Mar 17, 2025
Replies: 1 comment
-
I think you're looking for:
and before you call that you probably want to look at:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gigablox
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you're looking for:
and before you call that you probably want to look at: