DrChat / Gmod-vphysics

Replacement vphysics module for the Source engine (originally meant for Garry's Mod)
Other
92 stars 15 forks source link

Sticky collisions with player vs. props, bullets put too small of a force on props. #13

Open KyleSanderson opened 10 years ago

KyleSanderson commented 10 years ago

I'm not sure if it's because I'm using Linux or not (the makefile has a common not-relative linker error, a bunch of posix defines are missing), however I'm having significant difficulty using this. From my brief testing, prop_static's have a coarse collision (near sticky). prop_physics_multiplayer doesn't seem to be impacted by gun fire (nor +use).

It may also be that I'm using this in CS:S (which isn't supported?), any insight would be appreciated.

DrChat commented 10 years ago

For prop_static collisions, you testing it against your player collision model or against other props? Also, I don't believe prop_dynamics are supposed to move via physics at all. And gunfire vs props doesn't seem to be working at this time (it works, just puts an extremely small force on the object). I think the gravity gun punt has the same issue.

Doubt it is related to you using it in CS:S, but I haven't specifically tested it in CS:S.

KyleSanderson commented 10 years ago

you testing it against your player collision model or against other props? I'm using my player, walking into statics.

Also, I don't believe prop_dynamics are supposed to move via physics at all. Yeah I'm sorry. I believe it's prop_physics_multiplayer is what I meant.

(it works, just puts an extremely small force on the object) Ah, that's my primary use case! That's a shame :(

Doubt it is related to you using it in CS:S, but I haven't specifically tested it in CS:S. Unfortunately it could very well be related to this https://github.com/ValveSoftware/source-sdk-2013/issues/213 . I foolishly compiled against the new SDK as it's supposed to be closer to the release branch for Source 2k7 games, but I'm just not sure.

Shame about the bullet -> prop interaction though.

DrChat commented 10 years ago

Player collisions are just not working properly as of now. It isn't a bullet issue, it's an issue with vphysics itself.

The problem is originating in Physics_Collision.cpp CPhysicsCollision::TraceBox, bullet keeps returning a hit fraction of 0 if you're walking on the object, and source interprets that as you being stuck inside of the object. Valve got around it by just setting the hit fraction to like 0.0000001.

DrChat commented 10 years ago

Prop_static and static brush collisions are mostly fixed (shouldn't stick in most cases)

DrChat commented 10 years ago

I think there's a lot less sticky collisions on players vs props now due to me fixing 0-length box traces.