On the mining site map. When I shoot a boulder with a cannon the boulder goes where one would expect. If I throw a bomb at it, the explosion doesn't push it but rather pulls it in the wrong direction.

Can't explain it very well and putting randomosity(?) aside, friction and torque are arguing with each other somehow hence glitching/improper dynamics occur. Have to see the new engine and then maybe I'll put my head around it. I have a rough guess it's from undersampling of the algorithms which describe the differential equations. That's a PhysX issue anyway and its new version has a chance to account for it. If Nvidia devs have done what they ought to of course... Or whateva.



Staff member
It could be due to the torque being added from the bomb explosion, that makes it bounce closer or something. Or maybe it bounced into a wall? Could you post a gif/pic or vid of this happening?
It's pretty easy to reproduce; I just positioned a bomb above and to the side of the ore boulder and dropped it a bunch of times. The ore boulder goes in a seemingly random direction.


Staff member
Unfortunately I think this is an inherent issue with Unity's Physics engine as it produces random results each time the simulation is started.
things still shouldn't be going in the wrong direction when exploded at tho. Obviously the direction will be a LITTLE random, but going the other direction is enough to qualify as a glitch


Staff member
No, because there might be just a little difference between going one direction or not.
yes, because there *shouldn't* be. It's an EXPLOSION. if only the very edge of the explosion catches the thing and it teeters off sideways at .1 m/s instead of teetering off forwards at .2 m/s, OK, but things need to go in the opposite direction of the boom if they are hit square on with an explosion.
I haven't noticed such reaction by other objects btw. It seems as if just the boulders are misbehaving. And it's definitely not random.

Edit: I figured it out. Tested it with a bomb and a stone boulder from inventory. So, the explosion provides a good amount of spin to the boulder instead of a push. Since the boulder is heavy enough and has a good amount of friction it just rolls out in the opposite direction of where it should be going. Will post a gif in a bit.



Staff member
Well, as I said, explosion literally has an "add random torque" part. It's right there in the code :/
Ah, I see.

Estimating proper torque amount and direction for each object eats up resources. Even an "if" statement for boulders and the likes would slow down calculations. Hm... Doesn't the generation of that many random numbers eat a lot of resources too?