@model models/hunter/plates/plate2x2.mdl
@name Croco's Flying Machine!
@persist 
runOnTick(1)
if(first()){entity():setColor(255,60,20)
    entity():setMaterial("models/shiny")
    T = 0
   }
E = entity()
    POS = owner():shootPos() + vec(0,0,-75)
#entity():setPos(POS)
          TarQ = quat(ang(0,90,0)) #Calculate quaternion for target orientation
                CurQ = quat(E) #Calculate current orientation quaternion
                Z = TarQ/CurQ
                EP=E:pos()
                TTV = E:toLocal(rotationVector(Z)+EP)
                E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia())

if(owner():keyUse()){
     T  = T + 1
entity():weld(owner())
    entity():setPos(entity():pos() + vec(0,0,T))
}

