@name Wdadawd
@inputs P:wirelink
@outputs
@persist H
@trigger 
runOnTick(1)

E = entity():isWeldedTo()
rangerFilter(E)
R = rangerOffset(100+H,E:massCenter(),vec(0,0,-1))
EE = R:position()
T = (P:number("A")-P:number("D"))*10
F = (P:number("W")-P:number("S"))*-(P:number("Shift")? 100 : 20)
Pos = EE-E:pos()+(E:right()*F)+vec(0,0,40)
Ang = -E:angles()
E:setMass(500000)

#ja dobavil
Step = 1
H += P["Shift",number] - P["R",number] * Step
Pos = Pos + vec(0,0,H)
#ja dobavil


E:applyForce((Pos*30-E:vel())*E:mass())
E:applyAngForce((Ang:setYaw(T)*20-E:angVel())*E:mass())
