move_friction
This variable determines the friction for gliding
along surfaces with the AABB collision detection. At 0 there is no friction
at all, at 1 the entity sticks to the surface and does not glide at all.
Range:
0 .. 1 (default: 0.25 )Type:
varExample:
var speed = 5;
action player_glide()
{
...
while(1)
{
move_friction = 0.5; // strong friction
c_move(me, vector( time_step * speed,0,0), nullvector,IGNORE_PASSABLE+GLIDE+USE_AABB);
result = vec_length(vglide); // Gliding effect strength
if(result > 0.5) // too much gliding?
{
speed = max(0,speed - time_step); // reduce speed
}
else
{
speed = 5;
}
wait(1);
}
}
}
See also:
vglide, c_move,
move_min_z
► latest
version online