Object Spawning

Hello,

I am attempting to set the heading of a prop between two entities and correctly centre it, making it appear attached. We are using a midpoint between both entities to centre the centre and are now looking for a way to ensure the heading is correct making it appear attached. Is there any algorithm / calculation to dynamically calculate this? Currently looking at one to determine a difference potentially between the two headings of the objects being attached to.

Thanks,
Galvin