This PR aim to make space elevator's control feel better, with some formatting changes
Rework the function PlayerOnLiftMovement(), the function changes player.kv.airAcceleration and player.kv.airSpeed instead of using script to modify player's velocity( which cap to 10tick and feels bad with latency )
Change all 0.935 number to use a const SPACEELEVATOR_TUNING_TOP_FRAC
Add 3 utility functions:
bool functioin PlayerNotDoingInput( entity player )
vector function GetPlayerVelocityFromInput( entity player, float speed )
vector function RemoveVelocityHorizonal( vector vel )
This PR aim to make space elevator's control feel better, with some formatting changes
PlayerOnLiftMovement()
, the function changesplayer.kv.airAcceleration
andplayer.kv.airSpeed
instead of using script to modify player's velocity( which cap to 10tick and feels bad with latency )0.935
number to use a constSPACEELEVATOR_TUNING_TOP_FRAC
bool functioin PlayerNotDoingInput( entity player )
vector function GetPlayerVelocityFromInput( entity player, float speed )
vector function RemoveVelocityHorizonal( vector vel )
EDIT: I have a space elevator script for titanfall2 in https://github.com/DBmaoha/Super.Mixed.Game/blob/main/mod/scripts/vscripts/modweapons/mp_ability_gravity_lift.gnut , but it's not very similar as this one. I can try to implement some more changes from my script in future pr if you are interested!