Hello everyone,
I’m trying to spawn targets at random positions relative to my camera with certain restrictions, however I’m having plenty of trouble getting the transformations right.
How can I spawn an object at some distance D from my camera with
- A random horizontal angle offset
from my current orientation between
[-hA, hA] where a horizontal offset
would correspond to moving the mouse
left/right. - A random vertical angle
between [-vA, vA] where vertical
angle would correspond to moving the
mouse up/down.
Thanks,
Tom.