if (changedirection)
{
direction = altdirection;
gravity = altgravity;
friction = altfriction;
speed = altspeed;
}