I can't seem to get the math working for this, any help would be greatly appreciated.
I have two points A & B, and I calculate the distance between these, divide it by the length of the object I am wanting to spawn, then store it as an integer in a variable. The game then spawns a number of object instances equal to that variable.
What I am trying to do is spread all the currently spawned instances out evenly between the two points.
For reference, I am using a raycast every tick to get the positions and distance of the points. I'm trying to create a continuous laser weapon that uses small sprite segments for animation.