@name VTOLY 2.0
@inputs 
@outputs 
@persist Gyro:angle 
@trigger 
runOnTick(1)

E = entity():isWeldedTo()

if (first() | dupefinished()) {
    
}

Force=((-E:vel()*E:mass())+10*vec(1,1,1))+vec(0,0,153.2)
E:applyForce(Force)

P = E:angles():pitch()
Y = 0
R = E:angles():roll()

Gyro = angnorm(ang(0,0,0) - ang(P,Y,R))*E:mass()*62.5

E:applyAngForce(Gyro + $Gyro*5)
E:applyAngForce(-E:angVel()*E:mass())
