I am a L4D2 player and i am very confused about how collision works in game.
In L4D2 survivor will not collide with each other,but collides with special infected.And i use SDKHook_StartTouch to hook survivor touch each other,nothing happen.
I try to get the prop of survivor and infected,but they are the same.
Code:
m_nSolidType == 2
m_CollisionGroup == 5
I also test SDKHook_ShouldCollide in plugins ,but the game crash immediately with those error.
(i just start hook in "player_first_spawn" event and return true in ShouldCollide).
Code:
L 03/18/2022 - 05:58:14: SourceMod error session started
L 03/18/2022 - 05:58:14: Info (map "c2m2_fairgrounds") (file "F:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_20220318.log")
L 03/18/2022 - 05:58:14: [SM] Exception reported: Stack leak detected: sp:21804 should be 21768!
L 03/18/2022 - 05:58:14: [SM] Exception reported: Not enough space on the stack
Maybe CollisionHook extension is the best way to avoid those question,but i would like to know more about collision in souce script.
Can someone explain what is collision group ,solid type and how to use ShouldCollide?
And if i want survivor in L4D2 can collide with each other,how can i get the target?
Thanks for your help.