Answers for "friction gml"

0

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;
    }
Posted by: Guest on January-16-2020

Browse Popular Code Answers by Language