Facepunch / sbox-issues

175 stars 12 forks source link

Hitboxes that extend beyond the models bbox don't register hits. #3931

Closed andy013 closed 1 year ago

andy013 commented 1 year ago

Describe the bug

If a hitbox extends outside the models bbox then traces will go straight through.

To Reproduce

  1. Create a model with a hitbox that extends outside of it's bbox.
  2. Try and hit that hitbox with a Trace.Ray.

Expected behavior

The hitbox should register a hit.

Media/Files

https://github.com/sboxgame/issues/assets/10728824/487dcf51-23a6-4f46-b26a-19ddce9d17ed

Additional context

No response

andy013 commented 1 year ago

I fixed it by using SurroundingBoundsMode = SurroundingBoundsType.Hitboxes on the model.