vglide

This vector gives the amount of gliding along walls after a c_move function. If the entity didn't glide along a surface, the vector contains zero.

Type:

VECTOR

Remarks:

Will only remain valid until the next wait instruction.

Modified by:

c_move

Example:

var break = 5;
action player_walk()
{	
  move_friction = 1; // maximum glide
  //...
  while(1)
  {
    c_move(me,vector(time_step * break,0,0),nullvector,0);
    result = vec_length(vglide);	// Quantity of glide
    if(result > move_friction / 2)    // greater than half maximum of glide
    {
      break -= time_step;	// reduce speed
    }
    else
    {
      break = 5;
    }
    wait(1);
  }
} 

See also:

Entity, move_friction, c_move, c_trace  ► latest version online