- Home /
Question by
MustSeeMelons · Mar 29, 2016 at 11:57 PM ·
2dvector
On which side of the object is this point - 2D
I have an object with a circle collider in 2D space, I shoot towards it. How can I tell which side did I hit from the perspective of my shot point? Left/Right or Up/Down depending the the object orientation. If far enough away from the center, I would like to rotate the shot towards the center so that it points in that direction. I tried drawing out the situations on paper, but the fact that 0,0 is in the center complicates thing even further, making me believe that I can't tell just by comparing the point X,Y coordinates - am I right or is it just quite complicated? Also, would it be a 'hack', that I move the 0,0 to the lover left corner of my camera? Any subjects of math that could come useful would be also appreciated, thanks :)
Comment
Your answer