0
Q:

friction gml

if (right)
    {
    if (hspd < spd) hspd += fric;
    if (hspd >= spd) hspd = spd;
    }

if (left)
    {
    if (hspd > -spd) hspd -= fric;
    if (hspd <= -spd) hspd = -spd;
    }

if (!right && !left) || (right && left)
    {
    if (hspd >= fric) hspd -= fric;
    if (hspd <= -fric) hspd += fric;
    if (hspd > -fric) && (hspd < fric) hspd = 0;
    }
0

New to Communities?

Join the community