Facepunch / sbox-issues

175 stars 12 forks source link

Mesh Triggers stop working if you go inside of them #5258

Open Retroeer opened 7 months ago

Retroeer commented 7 months ago

Describe the bug

If you make a box mesh or something, and then slap another component that makes use of it's collider and the .touching function, it doesn't properly work if you go inside of the box.

To Reproduce

meshtriggers.zip

  1. Download le project
  2. Move the small box into the big red box (the mesh box)
  3. Move the small box into the bigger green box (the normal box collider box)
  4. Console will print out if you're touching it (in this case since it's a trigger, if you're inside of it)

Expected behavior

The Mesh trigger should behave like a normal trigger would, if you're inside of it it should continue logging that you're inside

Media/Files

No response

Additional context

No response

aylaylay commented 7 months ago

Okay so this is pretty much impossible in physics engines, meshes have no inside so they can't really be used for volume triggers. You need to be using convex hulls or multiple convex hulls for triggers. We should make this more obvious to the user if you try to use meshes for triggers.

aylaylay commented 7 months ago

I don't want to get your hopes up but I talked to Dirk and he said this might be possible to add.

Retroeer commented 7 months ago

:DDDDDDDDDDDDDDDDDDD

aylaylay commented 5 months ago

Just to keep you updated, we might be getting support for this soon. S2 has support for it now so it's possible to do.

Retroeer commented 5 months ago

thats actually awesome, thanks for the update