-
Beta Was this translation helpful? Give feedback.
Answered by
jrouwe
Feb 19, 2025
Replies: 1 comment
-
If you're not colliding against bodies then the standard collectors cannot give you the context you need, so you'll have to implement your own collector. You can use This pattern is used here: JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp Lines 303 to 313 in e5272c0 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hugarty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're not colliding against bodies then the standard collectors cannot give you the context you need, so you'll have to implement your own collector. You can use
CollisionCollector::SetUserData
with the character as parameter before callingCollideShape
so that in theCollisionCollector::AddHit
function you know and can store which character the hit is for.This pattern is used here:
JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp
Line 64 in e5272c0
JoltPhysics/Jolt/Physics/Character/CharacterVirtual.h
Line 564 in e5272c0