@name Test Car System
@inputs Pod:wirelink E:entity Cam:wirelink
@outputs 
@persist 
@trigger 
runOnTick(1)

W = Pod:number("W")
A = Pod:number("A")
S = Pod:number("S")
D = Pod:number("D")
Shift = Pod:number("Shift")

if (W)
{
    E:applyForce(E:right()*-500)
}

if (S)
{
    E:applyForce(E:right()*500)
}

if (A)
{
    E:applyAngForce(ang(0,5000,0))
}

if (D)
{
    E:applyAngForce(ang(0,-5000,0))
}

if (Shift)
{
    E:applyForce(E:right()*-800)
}

Cam:setVector("Direction",E:right()*-5)
Cam:setVector("Position",E:toWorld(vec(0,-50,22)))
