• Players hull being weird
    11 replies, posted
I made a script for my gmod server that resizes everyone so they get smaller and it works perfectly when it comes to physics with props and world, but when it comes to interacting with players they seem to only be half the height, so players can literally stand in eachother. Here is code for it. [code]AddCSLuaFile() if (SERVER) then hook.Add( "PlayerSpawn", "SizeOnSpawn", function( ply ) ply:SetModelScale( 0.425, 0 ) ply:SetViewOffset( Vector(0, 0, 28 ) ) ply:SetViewOffsetDucked( Vector(0, 0, 16 ) ) ply:SetStepSize( 16 ) ply:SetHull( Vector( -5.5, -5.5, 0 ), Vector( 5.5, 5.5, 29.75 ) ) ply:SetHullDuck( Vector( -5.5, -5.5, 0 ), Vector( 5.5, 5.5, 17.75 ) ) end ) end if (CLIENT) then hook.Add( "Think", "ClientSizey", function() local ply = LocalPlayer() ply:SetHull( Vector( -5.5, -5.5, 0 ), Vector( 5.5, 5.5, 29.75 ) ) ply:SetHullDuck( Vector( -5.5, -5.5, 0 ), Vector( 5.5, 5.5, 17.75 ) ) ply:SetStepSize( 16 ) end ) end[/code] Here is a short video of the issue I am having. [url]https://i.gyazo.com/132c0c7adc1137027ecc402599e9dbf0.mp4[/url] Also note that it is not because im using decimals in the sethull, its like that without them aswell.
Your x and y bounds for the hull are extremely small. Also, there's no need to do that constant resizing clientside. [editline]10th March 2017[/editline] Also, this might be related [url]https://github.com/Facepunch/garrysmod-issues/issues/2193[/url]
The constant resizing clientside is actually needed. Tried without it and it wouldn't work.
[QUOTE=Thiefdroid;51941226]The constant resizing clientside is actually needed. Tried without it and it wouldn't work.[/QUOTE] You just need to do it shared. There no reason to do it constantly.
[QUOTE=code_gs;51941321]You just need to do it shared. There no reason to do it constantly.[/QUOTE] Tried it shared but that for some reason was really laggy and a 2 seconds delay when trying to jump.. :/ Still need to know if its possible to fix my issue tho.
Bump. Is there any way to fix this or is GMod just broken? Does anyone have any ideas of how to simulate the physics in another way? I thought of placing an invisible crate there and scaling it down and making it non-solid to the player but this is going to be a pain in the ass to get to work correctly with my addon that prevents you from getting stuck in players.
I agree about the putting it in client side other wise it's weird
I just tested the code in a vanilla sandbox server and it works fine. I set the hull in a player_spawn gameevent hook.
[QUOTE=code_gs;52099880]I just tested the code in a vanilla sandbox server and it works fine. I set the hull in a player_spawn gameevent hook.[/QUOTE] Didn't work very fine on my server with 20 players tho.
What gamemode?
Hide and Seek
BUMP Third time now I come back to rescaling the player and this thing still exists with no fix to be found? Also slides off props now and if they are frozen you get stuck in them. Seems like the game gets more bugged the longer I wait.
Sorry, you need to Log In to post a reply to this thread.