-
What's the best way to handle interactions with collectible items, or items that the player interacts with that you don't want a dynamic collision response with? Think like coins or a fireflower in Mario, or weapons/ammo in Doom. Is OnContactValidate the place to record an interaction to process after the simulation completes, or is there a better way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I have not yet reached point of implementing collectibles, but I guess you have just few options, although it will also depend on the amount of items you want to handle (tens or hunderds):
Option 2 seems as most optimal for me, I guess handling even hundreds of such bodies won't be a problem for Jolt, assuming the fact they would be static. |
Beta Was this translation helpful? Give feedback.
Or you place a 'sensor' around your pickup, see: https://github.com/jrouwe/JoltPhysics/blob/master/Samples/Tests/General/SensorTest.cpp