9 self.velocity = movelib_dragvec(self.velocity,0.02,0.5);
11 vector movelib_dragvec(float drag, float exp_);
15 self.velocity *= movelib_dragflt(somespeed,0.01,0.7);
17 float movelib_dragflt(float fspeed,float drag,float exp_);
20 Do a inertia simulation based on velocity.
21 Basicaly, this allows you to simulate loss of steering with higher speed.
22 self.velocity = movelib_inertmove_byspeed(self.velocity,newvel,1000,0.1,0.9);
24 vector movelib_inertmove_byspeed(vector vel_new, float vel_max,float newmin,float oldmax);
26 vector movelib_inertmove(vector new_vel,float new_bias);
28 .float movelib_lastupdate;
29 void movelib_move(vector force,float max_velocity,float drag,float theMass,float breakforce);
32 void movelib_move_simple(vector newdir,float velo,float blendrate)
34 self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo;
37 #define movelib_move_simple(e,newdir,velo,blendrate) \
38 e.velocity = e.velocity * (1 - blendrate) + (newdir * blendrate) * velo
40 #define movelib_move_simple_gravity(e,newdir,velo,blendrate) \
41 if(IS_ONGROUND(e)) movelib_move_simple(e,newdir,velo,blendrate)
43 void movelib_brake_simple(entity this, float force);
46 Pitches and rolls the entity to match the gound.
47 Yed need to set v_up and v_forward (generally by calling makevectors) before calling this.
51 void movelib_groundalign4point(float spring_length, float spring_up, float blendrate, float _max);