@name bear_turret
@inputs [BRT ERT]:entity AIM:vector
@outputs BR B EV E
@persist

interval(1)
B = BRT:elevation(AIM)
E = ERT:bearing(AIM)+45
BR = angnorm(B+$B*10)
EV = angnorm(E+$E*10)
BRT:applyAngForce(ang((-BR-BRT:angVel():pitch()/4)*1000,0,0))
ERT:applyAngForce(ang(0,(-EV-ERT:angVel():pitch()/4)*1000,0))
