tf2-comp-fixes icon indicating copy to clipboard operation
tf2-comp-fixes copied to clipboard

Hitscan still partially uses collision hulls

Open sapphonie opened this issue 4 years ago • 3 comments

[Not a tf2 comp fixes bug, just a request]

https://youtube.com/watch?v=q0l0mRV7UC8

https://youtube.com/watch?v=HFttM3floNo

sapphonie avatar Feb 19 '21 01:02 sapphonie

Is this just a sniper rifle thing?

ldesgoui avatar Feb 26 '21 12:02 ldesgoui

no, afaik it's all hitscan weapons

sapphonie avatar Feb 26 '21 16:02 sapphonie

For ray intersection to actually work with a broad phase, the models have to fit in their bounding volumes, this is not the case for these examples, which is why this bug happens. There are ways to fix this:

  • Force ray intersection tests against models rather than their AABB, this is not acceptable because of the performance regression it would incur
  • Re-align the model within the AABB, or grow the AABB, this is not acceptable because it would change the feel of collisions and physics significantly
  • Attach another AABB to player models that would only trigger in hitscan detection, this is a lot of vphysics trickery and patching, basically hardly feasible with SourceMod

It's probably not going to get fixed

ldesgoui avatar Jan 04 '22 16:01 ldesgoui