Raised This Month: $51 Target: $400
 12% 

is there any topic explain how collision works in game?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LinLinLin
Senior Member
Join Date: Sep 2021
Old 03-18-2022 , 10:09   is there any topic explain how collision works in game?
Reply With Quote #1

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.
LinLinLin is offline
Paimon
Member
Join Date: Jul 2021
Location: Zootopia
Old 01-25-2024 , 04:05   Re: is there any topic explain how collision works in game?
Reply With Quote #2

emmm...
I dont know if you still need these but I will put them here...
https://developer.valvesoftware.com/...llision_groups
https://developer.valvesoftware.com/...lisionProperty
Paimon is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode