i have an interesting question about geometry. I have two or more moving objects outside of my stage's viewport (blue and red circle in the image below), which i want to point at with two arrows on the border of the screen (or better, viewport bounds). The black dot never moves, because it represents viewport's center.
So, arrows must always point at the objects and must always be "locked" on the border of the screen.
Can someone help me with this?
Following @Stormwind answer, i managed to get a
Ray from objects to screen center.
Now my problem is defining the
I tried declaring it like this:
Vector3 v1 = new Vector3(0, 0, 0) Vector3 v2 = new Vector3(screen.width, screen.height, 0) BoundingBox box = new BoundingBox(v1, v2)
and then get the intersection by using the
but behaviour is funny.
I think i missed out something or mistakenly declared the