This is the CS:S Crouch code:
[CODE]/**
* Player hull & eye position for standing, ducking, etc. This version has a taller
* player height, but goldsrc-compatible collision bounds.
*/
static CViewVectors g_CSViewVectors(
Vector( 0, 0, 64 ), // eye position
Vector(-16, -16, 0 ), // hull min
Vector( 16, 16, 62 ), // hull max
Vector(-16, -16, 0 ), // duck hull min
Vector( 16, 16, 45 ), // duck hull max
Vector( 0, 0, 47 ), // duck view
Vector(-10, -10, -10 ), // observer hull min
Vector( 10, 10, 10 ), // observer hull max
Vector( 0, 0, 14 ) // dead view height
);[/CODE]
[CODE]
SetHull(Vector(-16, -16, 0), Vector(16, 16, 62))
SetHullDuck(Vector(-16, -16, 0), Vector(16, 16, 45))
SetViewOffsetDucked(Vector(0, 0, 47))
SetViewOffset(Vector(0, 0, 64))[/CODE]
Even with the CS:S hulls it's still not the same...
[video=youtube;GPdJjyFE634]https://www.youtube.com/watch?v=GPdJjyFE634&feature=youtu.be[/video]
In CS:S at 0:07 it just goes under fine, but in gmod at 0:40 in glitches in the top weird...
In CS:S at 0:20 it goes from 128.03 to 119.53 when crouching in GMOD at 1:00 it just stays on 128.03 even when crouching...
Video is private
[QUOTE=arow1234;51745555]Video is private[/QUOTE]
Fixed
[QUOTE]In CS:S at 0:20 it goes from 128.03 to 119.53 when crouching in GMOD at 1:00 it just stays on 128.03 even when crouching...[/QUOTE]
128.03 - 119.53 = 8.5
8.5 + 45 = 53.5
Vector( 16, 16, 53.5 ), // duck hull max ?
it's right but not right yes it does go from 128.03 to 119.53, but then you cant crouch under 45 units...
unless it changes to 45 on ground and 53.5 only in air..
very confusing
[QUOTE]In CS:S at 0:07 it just goes under fine, but in gmod at 0:40 in glitches in the top weird...[/QUOTE]
i'm guessing this is just a gmod bug witch is unfixable - thanks garry
anyone have any ideas or understand crouching more than me?
im not sure if this has anything to do whit this but arent css playermodels a diffrent size than normal or standard playermodels?
[QUOTE=arow1234;51748988]im not sure if this has anything to do whit this but arent css playermodels a diffrent size than normal or standard playermodels?[/QUOTE]
I don't think so i have used CS:S models and Hl2 ones.
[QUOTE=FiBzY;51744613]In CS:S at 0:07 it just goes under fine, but in gmod at 0:40 in glitches in the top weird...[/QUOTE]
CS:S has some simple view offset changing script that lowers the camera if it is about to be inside a wall.
This is very apparent [b]since the duck view position on the Z axis - 47 is 2 units above the max hull for ducking in CS:S - 45. So your eyes when ducking are 2 units above the top of your head so to speak.[/b] Same goes for normal standing up.
[QUOTE=FiBzY;51744613]In CS:S at 0:20 it goes from 128.03 to 119.53 when crouching in GMOD at 1:00 it just stays on 128.03 even when crouching...[/QUOTE]
You were flying in no clip, so obviously crouching didn't change your vertical position.
[editline]30th January 2017[/editline]
[url]https://github.com/LestaD/SourceEngine2007/blob/43a5c90a5ada1e69ca044595383be67f40b33c61/se2007/game/shared/cstrike/cs_gamemovement.cpp#L343-L408[/url]
And here's the code that does it.
How can I change the vertical position while in air/flying?
also I have this which is like that cs_gamemovement
What else am I missing?
Is it because I don't have observer hulls min/max? If so how do I add it?
bumping becuase still need help
I figured this out
Sorry, you need to Log In to post a reply to this thread.