Jump to content
 Share

_Rocket_

Bad Hitboxes? Doing This Might Help!

Recommended Posts

Hey there everyone. Bad hitboxes are not a new thing to Gmod. Unlike some more competitive shooters like tf2 or CS:GO, Gmod isn't designed for highly accurate hitboxes. This results in a more competitive gamemode like TTT to suffer bad hitreg. Is all hope lost? Not yet it isn't!

 

There are ways you can improve hitboxes. Lerp is one of those things.

 

What is Lerp?

 

Lerp is a fancy way of saying lag compensation. Hitscan weapons like shotguns, pistols, m16's, etc. need to communicate with the server to detect a hit. Hitscan weapons use player hitboxes to detect if a bullet has hit or not. Unfortunately, this game isn't optimized to keep hitboxes close to client-side player models. So more often than not, player hitboxes lag behind the player model you are shooting at.

 

How do you know if lerp is the problem? Simple. If you have ever seen blood particles emit from a shot but the person you hit didn't take any damage, that means it's a lerp issue.

 

How Do I see Lerp?

 

Open your console and put in net_graph 1, this is what should show up:

 

image.png.e429d6b64084eb5a64cc4d18ccc4a20a.png

By default, lerp is going to be at 100 ms, which is TERRIBLE. We need to change this.

 

Your lerp settings are dependent on a few specific console variables that are used to determine various network configurations... Or in English: "Console commands can change lerp to be better". Now, lerp is not one size fits all. You need to determine the correct lerp settings based off your connection speed to the server.

 

On slow connections, I highly suggest you use this configuration:

 

cl_cmdrate 40
cl_interp 0
cl_interp_ratio 2
cl_lagcompensation 1
cl_pred_optimize 2
cl_smooth 0
cl_smoothtime 0.01
cl_updaterate 40
rate 35000

 

This should result in this lerp:

image.png.6c15f2540d5e1f1645a70beb8ee54051.png

 

What this will do is purposely delay your hit registration. If your connection is poor, hitboxes are very likely going to lag behind the player models. With a high lerp setting, the hitreg will be delayed long enough so the bullet actually connects with the hitbox.

 

If you have a good connection, you might want to consider using this configuration:

 

cl_cmdrate 67
cl_interp 0
cl_interp_ratio 1
cl_lagcompensation 1
cl_pred_optimize 2
cl_smooth 0
cl_smoothtime 0.01
cl_updaterate 67 // The tricks to get 1.4ms lerp are placebo you're still forced to .0152
rate 60000

 

This will ensure that your hit is registered as soon as it possibly can without killing your internet speed and eating up bandwith. Your lerp should look like this:

image.png.6c638c9836c87fb07cc52caf86d5f7c8.png

 

Running these commands with a single console command:

 

Now, if you don't want to manually input this every single time, there is a way to run this with a single console command. Step 1: Go to the garrys mod files.

image.thumb.png.e6dbad0c8f6d32994055dea0a50800b7.png

Step two, navigate through the following folders: garrysmod > cfg and click on the cfg folder.

 

Step three, download this zip file, it holds a .cfg document.

lerp.zip

You can open the .cfg document in notepad to make changes to it.

 

Now, extract the zip folder and drag the .cfg file into the cfg folder.

 

EVERY TIME YOU LAUNCH THE GAME:

Put in the console: exec lerp

 

This will execute the lerp file, which will input all the console commands automatically. Make sure you do this every time, otherwise your lerp settings will remain unchanged. I suggest you open the lerp.cfg file with notepad and read everything for your own piece of mind.

 

This may not completely fix bad hitboxes, since some of it is server-side (and some of it is just Gmod itself). But this should help a decent amount at the very least.


I write programs and stuff.

 

If you need to contact me, here is my discord tag: Dustin#6688

 

I am a busy person. So responses may be delayed.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites


Posted  Edited by _Rocket_

I haven't tried to see how far I can push lerp and tick rates. My internet cannot handle a high tick rate. If you know how to fool around with those commands you can try at your own discretion.

 

Again, Gmod isn't built with competitive games in mind. I don't even know if servers restrict rates below 0.0152 in Gmod. So you might have some leeway, unlike CS:GO.

 

 

3 hours ago, edboy said:

let's play a game of twister

Sure

 

 

@alexw200 Hopefully that answers your question at least lol.

Edited by _Rocket_

I write programs and stuff.

 

If you need to contact me, here is my discord tag: Dustin#6688

 

I am a busy person. So responses may be delayed.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites


  • 2 weeks later...

I dont suggest going lower than the tickrate of the server, as you will be simply lowering your hitreg.

 

cl_interp_ratio / cl_updaterate == interpolation. Simply cranky cl_updaterate as high as possible, and set cl_interp_ratio to 0 (if allowed).

I do not suggest setting rate under 3m at all. At most, the connection would be 30 KB/s, its not that huge

Share this post


Link to post
Share on other sites


  • 5 months later...
  • 4 months later...
Posted  Edited by Hyper Lthl Vector

If you really want to see how lerp works, I'd run a server with bots and have sv_showplayerhitboxes, sv_showimpacts and sv_showlagcompensation set to 1. Then have bot_mimic set to 1 as well, and I shit you not, you can actually see the delay. 

 

 

Granted this probably doesn't exactly emulate the issues on a real server, but it gives you an idea on how interp is affecting hitboxes. You can even use net_fakelag to simulate your latency. So the bot will for example mimic your movement of someone with 200 ping or 40 ping.

Edited by Hyper Lthl Vector

Share this post


Link to post
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...