ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.65k stars 617 forks source link

Visualizing hitboxes in game #1826

Closed ghost closed 7 years ago

ghost commented 7 years ago

Anybody have suggestions for viewing hitboxes live in-game? I want to see how they all move during animations, how they scale with clienttrace etc (while testing hitreg).

This is in my own mod, so I can write whatever code is needed (although the engine is a spooky black box).

Thanks in advance for not posting about obscure cs1.6 issues and derailing my thread.

tschumann commented 7 years ago

Does one of the r_drawentities already do it? If not I remember this: http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg07085.html Looks like you need to have the bone positions already or something and of course the referenced SV_StudioSetupBones isn't in the default SDK.

WaLkZa commented 7 years ago

https://github.com/dreamstalker/rehlds/pull/490

ghost commented 7 years ago

Turns out you can use StudioDrawHulls() for this. Of course, you can't see the implementation of this or change the poorly chosen box colors... unless you look for the xash3d version.

Good thing we open sourced this engine. Thanks, all!

WaLkZa commented 6 years ago

https://github.com/s1lentq/hitboxtracker