I am trying to make a system where I can click on an enemy unit to cast something onto it, for example neural parasite a collossus. From my basic guesses I would need the XYZ in world space of the unit, the view and projection matrices and the viewport in order to unproject back to screen coordinates so I can click my mouse there. Any tips how to find those offsets?
↧