For the player movement, I just used Godot's move_and_slide() function. All I have to do is to make sure the slope angle is within the accepted interval for the player to slide. If u are not using godot, then I am not quite sure, sorry!
s2007131
7
Posts
4
Followers
42
Following
A member registered Oct 30, 2019 · View creator page →
Creator of
My attempt at replicating source engine movement.
Action
Play in browser
Recent community posts
Yes I have googled multiple articles about air strafe code. But this one is the most useful one because it explains how the acceleration is applied in Source engine. Once you understand you should be able to implement it in Godot. Although the code example in the article is not perfect. So I just hard coded some conditions into it to make it feel like CS:GO movement.
$pivot is a spatial on the player's eyes, yes. Which has the camera + hands + gun as children.
For the mouse sensitivity, I was playing around with the stretch_shrink to give the game a "low res" look like those psx games, which affects mouse sensitivity. For it to remain the same speed I just multiply it by the stretch shrink factor.