@name Pet
@inputs Pitch Yaw Roll Height Distance Skin
@outputs 
@persist Angle:angle Vec:vector Vec2:vector Dist
@trigger all
interval(10)

Angle=(entity():heading(owner():pos()-vec(0,0,-owner():height()/2)))*-200
Angle=Angle:setPitch((entity():angles():pitch()-Pitch)*-200)
Angle=Angle:setYaw(Angle:yaw()-Yaw*-200)
Angle=Angle:setRoll((entity():angles():roll()-Roll)*-200)
entity():applyAngForce(Angle*entity():mass()*0.1-entity():angVel()*entity():mass())

Vec=owner():pos()-entity():massCenter()-vec(0,0,-50-Height)
Vec=Vec:setX(0)
Vec=Vec:setY(0)
entity():applyForce(Vec*100-entity():vel()*entity():mass())

Dist=entity():pos():distance(owner():pos())-100-Distance
Vec2=owner():pos()-entity():pos()
entity():applyForce(Vec2*Dist)

#entity():setSkin(Skin) 





