If no solution is found I'll code a replacement dynamics engine that handles this myself, but I'd like to avoid that, as the game's built-in physics engine is more accurate in terms of collision detection and smoother in dynamics.
Defeating friction?
Moderator: Moderators
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Defeating friction?
I'm having a hard time trying to convince the MoHAA physics engine to cooperate. Script_objects tend to 'stick' to surfaces (i.e. it's hard to set them in motion again once they come to a rest, they often stay in place even if large impulses are applied, especially those which are coplanar to the surface). I guess it was a poor attempt at implementing friction, but it drives me nuts! Any ideas how to overcome this? It's been making me hold back a pretty cool physics-based mod. 
If no solution is found I'll code a replacement dynamics engine that handles this myself, but I'd like to avoid that, as the game's built-in physics engine is more accurate in terms of collision detection and smoother in dynamics.
If no solution is found I'll code a replacement dynamics engine that handles this myself, but I'd like to avoid that, as the game's built-in physics engine is more accurate in terms of collision detection and smoother in dynamics.
-
SilentAngel
- Captain
- Posts: 239
- Joined: Wed Mar 12, 2008 8:27 pm
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Hmm.. ambitious 
Unfortunately the built-in physics engine is almost useless, I don't think you can do anything to change the friction. Or, hmm, one thing you could try is to first apply a minor impulse away from the surface (so the object comes 'loose'), and only then apply the main impulse.
What are you going to make?
Unfortunately the built-in physics engine is almost useless, I don't think you can do anything to change the friction. Or, hmm, one thing you could try is to first apply a minor impulse away from the surface (so the object comes 'loose'), and only then apply the main impulse.
What are you going to make?
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
I know it's useless, but I just need it to handle small objects bouncing off walls in a believable manner. I'm making climbable ropes. 
I tried adding a minor impulse, but the thing is that once an object comes to a rest, it's almost impossible to break contact with the ground solely by applying velocity, regardless of the magnitude of the impulse.
I've also come upon some other anomalies, like the fact that a resting object doesn't even have a velocity vector of ( 0 0 0 ) but rather ( 0 0 1 ), and mind you, it's not moving. 
I'm afraid I'll have to code my own little physics engine for this.
Looking at the cvar list right now I see there's something called "sv_friction" with a default value of 4. I'll check if this has anything to do with the object physics engine.
I tried adding a minor impulse, but the thing is that once an object comes to a rest, it's almost impossible to break contact with the ground solely by applying velocity, regardless of the magnitude of the impulse.
I'm afraid I'll have to code my own little physics engine for this.
Looking at the cvar list right now I see there's something called "sv_friction" with a default value of 4. I'll check if this has anything to do with the object physics engine.
i know im not anywhere in the scripting the way yall r...by no means but is there a way u could class the object like a nade that would bounce off things?....just wondering but that might be hard coded in the game too not sure...but i would think if u could make the game think its a nade then it would probably have those properties as one...just a thought
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:


