Not sure how much more I can explain besides the title. I'm sure it's simple to accomplish but I'm not sure what I'd use.
Develop games in your browser. Powerful, performant & highly capable.
lerp(a,b,x) should do it.
spriteC set X to lerp(spriteA.X, spriteB.X, 0.5)
That should place spriteC exactly in the middle between spriteA and spriteB on X axis.
That basically works! Though I just thought of something: what if the second object's target was the part of the bounding box the first object was closest to, rather than targeting the second object's origin?
lerp(a,b,x) a or b can be anything - x will always be a "way from a to b".
"bounding box the first object was closest to" should be fine too. It all depends what you want to do and then adjust your math to make it work
I guess by bounding box I meant collision box, I think. Not sure of the name. Actually I kind of figured out a weird way to go about what I wanted to do. Thanks for the help though, it pointed me in the right direction!