@name Explosive Puck
@inputs X Y Z Active Explode
@outputs Mul F:vector Explode
@persist Explode
interval(1)
if (Active) {
SelfVel = entity():vel()
SelfPos = entity():pos()
T = 0.015 M = 402 K = 10 ThrK = 50
Dx = X - SelfPos:x() Dy=Y - SelfPos:y() Dz = Z - SelfPos:z()
Fx = -M / T / ThrK * (Dx * K - SelfVel:x())
Fy = -M / T / ThrK * (Dy * K - SelfVel:y())
Fz = -M / T / ThrK * (Dz * K - SelfVel:z())
F = vec(Fx,Fy,Fz)
Mul = sqrt(Fx^2 + Fy^2 + Fz^2)
}
else {Mul = 0}
