Spheres hurled off of map entity edges in Physics?

Posted By: Ichiro

Spheres hurled off of map entity edges in Physics? - 04/27/07 02:53

Hello. I've noticed that when a PH_SPHERE comes into contact with a "sharp" edge on a map entity, the physics engine will cause it to "pop" away, giving it a large amount of velocity. I asked about this in a Physics thread about 6 months ago, and included a video (WMV, 1MB) demonstrating this, but never came up with a solution.

Do you have any pointers on how I can eliminate this behavior? (A6 Pro 6.40.5.)
Posted By: jcl

Re: Spheres hurled off of map entity edges in Phys - 04/27/07 07:53

I have no ready solution, but I suppose this behavior is caused by a too-high elasticity and a too-low momentum of inertia. I would increase the sphere's mass, increase gravity, and experiment with friction, elasticity, and damping settings.
Posted By: Ichiro

Re: Spheres hurled off of map entity edges in Phys - 04/28/07 16:26

Gotcha; I'll keep tweaking, thanks.
Posted By: lostclimate

Re: Spheres hurled off of map entity edges in Phys - 04/28/07 22:09

i think its a bit like a soccerball going over a curb, the middle of the ball is right above the line where it hits the curb, and since its rolling, the rolling surface hits the corner with a little harder of impact than just the movement speed, causing it to "jump", and of course a lot of physics engine do have a bit more drastic reactions than real life too
Posted By: Ichiro

Re: Spheres hurled off of map entity edges in Phys - 05/02/07 02:37

Yeah, I thought so at first, but it eventually it becomes ridiculous -- I've had a ball gently roll towards a tiny lip and then fly off into space.

Oh well.
Posted By: Raymaker

Re: Spheres hurled off of map entity edges in Phys - 05/09/07 11:26

Dont blame me if i am wrong, because i'm only 14, but i think that is the question of the vary vary small surface that your sphere is hitting. I mean that the presure is too big because of this law :

preasure = force/surface area
If you understand that the surface is vary small lets say 0.00001;
It is not vary important how strong is the force of the sphere when it's devided by a 0.0000001 it becomes 10000000 greater and the sphere gets pushed away with that amount of force according to 3th Newton law;
Posted By: Joey

Re: Spheres hurled off of map entity edges in Phys - 05/09/07 12:43

mmh you're really only 14

the pressure the ball is pushed away with get's multiplied with the surface again to get the resulting force on the whole ball, so the surface area has practically nothing to do with it.
Posted By: lostclimate

Re: Spheres hurled off of map entity edges in Phys - 05/09/07 16:52

and since in real life most corners dont have a exactly completely straight 90 degree edge, we dont see this very much yay its figured out! but your still kinda screwed by it, you'll just have to round out your corners or take the high jump
Posted By: Raymaker

Re: Spheres hurled off of map entity edges in Phys - 05/10/07 13:18

IF there is nothing to do with the surface area why don't you make a hole in the wood for example with a cube. You should do it with something sharp because it generates more preasure.... whatever it is. The only solution i see is like the lostclimate said to round the corners :-) maybe i'm wrong but thats what i think it is; ;-)
Posted By: Joey

Re: Spheres hurled off of map entity edges in Phys - 05/10/07 14:00

it was real world physics i was talking about, leaving out side effects such as friction, inertia and many others. if an implementation would require rounding edges it would have some kind of fault.
Posted By: Ichiro

Re: Spheres hurled off of map entity edges in Phys - 05/10/07 21:38

Thanks for the suggestions, guys. Ultimately, I think this is a flaw in the physics simulation -- I ran further tests, and it's possible to get the ball flying at ridiculous speeds. If that ball is the only thing moving, it shouldn't be possible for |v(final)| to be greater than |v(initial)|... unless the mass of the ball is being converted into kinetic energy (E=MC^2 after all ).

I *think* I just need to go with a system of c_move()s. Alas!
Posted By: jcl

Re: Spheres hurled off of map entity edges in Phys - 05/11/07 09:11

It is certainly a flaw in the physics simulation, but when you use a physics engine you just have to deal with such flaws. ODE uses a numerical approximation, which results in such a behavior - called an "explosion" - if parameters are outside its usual range. It's certainly possible to fix this, by adjusting the ball's physical properties as suggested here.
Posted By: Ichiro

Re: Spheres hurled off of map entity edges in Phys - 05/11/07 16:08

Yeah; I've been mucking with gravity, elasticity, check distance, fps lock, sexiness, mass, etc. I just haven't been able to find any parameters that work for me. Has anyone else run into this problem (rolling sphere) and managed to solve it?
© 2024 lite-C Forums