Projectile Cannon

Any idea how do i implement this?