I'm thinking about the best ways to make a world war II style Anti Aircraft gun(with the puffs of black smokey explosives all around the target).
I was hoping it would be possible to first get the distance of the target with:
var distance = Vector3.Distance(transform.position, target.position);
And next instantiate an explosive gameObject at that distance with slight random rotations and distances applied. I'm not sure how to do this though.
If you can give me any tips for this method, or if you have another method that would be better to implement I would like to know.
Thanks in advance for any help.