Hey Norbo, hope you're well.
I'm just wondering if there's an obvious way to do what I'm trying to do here. The basic problem is that dynamic entities which bounce on my floor (which is a kinematic box with bounciness = 0) tend to bounce pretty much forever -- the bounces get very, very tiny, but collision events are still fired over and over again. This is annoying for things like triggering bounce sound effects based on collision events (the sound gets triggered long after the object has stopped visibly bouncing).
Today, I ran into the problem again, so I thought I'd ask if you have a recommended solution. What I was trying to do today was the create an extremely bare-bones character controller to use for enemies in my game. No stepping required, no support slope/hasTraction calculations -- just basically something that knows when it has landed after it jumps is what I'm going for. I nabbed the code from your SphericalCharacterController's SupportFinder, specifically the UpdateSupports method, and decided to try using only the code before the raycasting. It actually works great as long as the creature's bounciness is set to 0. Unfortunately, the enemy I'm working on is a blob that chases you by jumping after you and bouncing around. A bounciness of .65 is what feels right, but this leads to endless jittering of the SupportFinder.HasSupport bool after the creature has landed from a jump (presumably because the creature is invisibly bouncing a tiny bit into the air every two frames or so).
So, my question is, is there a way to make even bouncy objects come to rest much more quickly within the engine? I've tried setting the creature's Entity's ActivityInformation.DeactivationManager.VelocityLowerLimit to many different values, everything from .01 to 5, but nothing seems to address the bounce jittering. Have also tried LinearDamping.
My solution right now is to detect the number of bounces and once they've gone above a certain number set the creature's bounciness to zero, setting it back a few frames later. This actually works pretty well, although it's not always instant, and feels somewhat sloppy.
Anyway, sorry that went on a bit long. Thanks for reading, Norbo!
Any way to subdue the jitteryness of bouncing?
Re: Any way to subdue the jitteryness of bouncing?
It sounds like increasing the CollisionResponseSettings.BouncinessVelocityThreshold would help. Impacts with relative normal velocities below the bounciness velocity threshold will not trigger any bounce. It defaults to 1; this typically needs to be changed when simulations use a different scale interpretation than the demos.
Re: Any way to subdue the jitteryness of bouncing?
Yep, that solved any and all problems. Awesome
I had looked around the Space object for a setting like that -- I didn't realize there was a static settings class! Is there a place to read about the effects/dangers of tweaking things like MaximumPositionCorrectionSpeed, PenetrationRecoveryStiffness, and StaticFrictionVelocityThreshold?
I've been keeping masses and shape dimensions between .5 and 10 for the most part (I have some larger kinematic boxes, though, for walls), but I think my bounciness problem likely stemmed from the fact that my gravity vector is set at (0, -36, 0) for maximum-gaminess. Anyway, turning BouncinessVelocityThreshold = 10 seems to work really well for allowing the large bounces while completely keeping things on the ground when they're not visibly bouncing. It has a very polished, game-like feel to it now. Yay!
Thanks a lot, as always, Norbo!
Alex

I've been keeping masses and shape dimensions between .5 and 10 for the most part (I have some larger kinematic boxes, though, for walls), but I think my bounciness problem likely stemmed from the fact that my gravity vector is set at (0, -36, 0) for maximum-gaminess. Anyway, turning BouncinessVelocityThreshold = 10 seems to work really well for allowing the large bounces while completely keeping things on the ground when they're not visibly bouncing. It has a very polished, game-like feel to it now. Yay!
Thanks a lot, as always, Norbo!
Alex
Re: Any way to subdue the jitteryness of bouncing?
Not a central location beyond their intellisense documentation right now, no.Is there a place to read about the effects/dangers of tweaking things like MaximumPositionCorrectionSpeed, PenetrationRecoveryStiffness, and StaticFrictionVelocityThreshold?
Some of them are referenced in the demos ConfigurationHelper, though not with much explanation.
If you've got a question about a particular one, I'll try to answer. PenetrationRecoveryStiffness is the amount of penetration error corrected each frame, MaximumPositionCorrectionSpeed limits the velocity of that correction to prevent explosions, and StaticFrictionVelocityThreshold is just the arbitrary value of velocity below which static friction is used.