@name torque_turret
@inputs Ent:entity Act
@outputs Fire
@persist 
@trigger 

runOnTick(1)
Vec=owner():aimPos()-Ent:pos()
Ang=Vec:toAngle()
Fire=Act*owner():keyAttack1()
if(Act){
    TarQ=quat(Ang)
    CurQ=quat(Ent:angles())
    Q=TarQ/CurQ
    V=Ent:toLocal(rotationVector(Q)+Ent:pos())
    Ent:applyTorque((600*V-30*Ent:angVelVector())*Ent:inertia())
    
} 