#Physics failsafe [Outdated]

1 messages · Page 1 of 1 (latest)

shell orchid
#

Ignore this suggestion. I made an updated suggestion on how to tweak the physics engine settings to fix the problem altogether.

~~It sucks when the physics glitch out and make your items go flying at mach 1. This suggestion doesn't fix the issue entirely, but would make it less frustrating with minimal effort. The idea is to prevent the item from flying off if it suddenly starts glitching out:

  1. Check the squared length of the items velocity vector. If it exceeds a value that is unrealistic to achieve through normal interaction proceed to step 2

  2. Check if the item is colliding with anything. If it is then wait for the collisions to be resolved

  3. Set the items velocity to 0 or alternatively you can normalise it and multiply it by a lower value to keep some of the velocity

The check is relatively inexpensive and can be performed on every item every frame, but if you want it to be a bit more optimised you can limit it to only a handful of items per frame~~

lavish widget
#

Wait this is actually genius, wouldn’t this fix the bug with the crates where it shoots your items everywhere? That happened to me many times

shell orchid
#

It will still shoot out the items, but they will only fly away for 1 physics frame so they wont go far

#

Oh! Unreal already has this failsafe built in, it just has to be enabled! I'll make an updated post with potential solutions for the problem

grave bear
#

so its just not working?

shell orchid