Facepunch / sbox-issues

176 stars 12 forks source link

[Player Controller] Player Controller sets off Triggers twice, due to it's two collider system #6855

Open Retroeer opened 1 week ago

Retroeer commented 1 week ago

Describe the bug

Due to the player controller making use of 2 colliders, the capsule and the box, this causes triggers to, well, trigger twice.

To Reproduce

  1. Make a shrimple trigger that just prints the GameObject of whatever enters it
  2. It should print out the Player GameObject twice

Expected behavior

The trigger should only be printing the GameObject once, you could solve this by making a new GameObject parented to it and giving it a playertrigger tag or something, and then making triggers only detect that, but then creating triggers through action graph would be a little annoying because you're essentially having to check for that tag every time

Media/Files

https://github.com/user-attachments/assets/2d0461e5-2c51-4f97-8c9d-9df6dfc37ec9

Additional context

No response

aylaylay commented 3 days ago

For this situation I've added ITriggerListener.OnTriggerEnter/Exit that takes a gameobject instead of collider