Weapon Physics

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Fred187

FNG / Fresh Meat
Apr 22, 2007
2
0
0
Would it be possible to make weapons react realisticly to what they fall on when they are dropped, rather than always falling horizontally, regardless of terrain? I would have thought that similar physics could be used for weapons as bodies, only it would be easier, as they are rigid.
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,067
743
0
35
liandri.darkbb.com
Rag-doll is client side. So my bodies fall different from yours. Weapons can't be client side, because they have an effect on the gameplay. Applying physics to them would increase the serverload for very little gain.

=> disagreed.
 

SgtH3nry3

FNG / Fresh Meat
Weapons are synced anyway, at least the position afaik.

So maybe it's possible to have the weapon behave like a simple object using ragdoll physics but always falling towards this fixed synced position?

It might sound stupid but with this the weapon falls like a ragdoll and yet, it's position is the same for every player.
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,067
743
0
35
liandri.darkbb.com
You mean like a strong gravity center somewhere where its supposed to land (like that super weapon in ChaosUT2) and on the way to that location it tumbles randomly rag-doll style?
Interesting, but it might look even weirder than it does now. We'd have to see it to decide whether its good or not.

A problem could be that the server has to decide a realistic position in the first place, or else we have the same problem as we have now, only that the gun looks better while its still on the way to its horizontal position (takes how long? 0.5 seconds? A full second?).
So the server has to do weapon physics anyway. We could as well link the clients to that.
It would cause the serverload I mentioned before though.
 

SgtH3nry3

FNG / Fresh Meat
You mean like a strong gravity center somewhere where its supposed to land (like that super weapon in ChaosUT2) and on the way to that location it tumbles randomly rag-doll style?
Interesting, but it might look even weirder than it does now. We'd have to see it to decide whether its good or not.

A problem could be that the server has to decide a realistic position in the first place, or else we have the same problem as we have now, only that the gun looks better while its still on the way to its horizontal position (takes how long? 0.5 seconds? A full second?).
So the server has to do weapon physics anyway. We could as well link the clients to that.
It would cause the serverload I mentioned before though.
It should only look weird for people which have lag.
 

Fred187

FNG / Fresh Meat
Apr 22, 2007
2
0
0
It could be client-side and partially synced, so all the physics would be client-side, and the server could collect all the data to estimate an average position for the weapon (where it would automatically fall if the client had weapon physics turned off). As long as the physics code was fairly tight, each client wouldn't calculate the weapon to fall too far from the average (it could probably be done to be consistenly <0.25m), then the weapon pickup distance could be marginally increased. I don't know much about coding, so this is all completely theoretical.