@name Projectile Motion
@persist Drag [InAcc Acc Vel Pos]:vector
@model models/props_phx/misc/smallcannon.mdl
runOnTick(1)
if(first())
{
    #[ Edit the constants below for different trajectories. ]#
    WindWE=0
    WindSN=0
    Gravity=-0.1
    MuzzleVelocity=30
    Drag=0.00075
    #[ Edit the constants above for different trajectories. ]#
    InAcc=vec(WindWE,WindSN,Gravity)
    Vel=entity():up()*MuzzleVelocity
    Pos=entity():massCenter()
    Ang=entity():angles()
    holoCreate(1,Pos,vec(0.5,0.5,2),Ang,vec(0,0,0))
    holoModel(1,"hq_cone")
}
else
{
    Acc=InAcc-(Drag*Vel)
    Vel+=Acc
    Pos+=Vel
    Ang=-heading(vec(),ang(),Vel)+ang(90,0,0)
    holoPos(1,Pos)
    holoAng(1,Ang)
}
