|
Hi I'm attempting to create a HUD element that appears if the players target has left the screen,its fixed to the edges of the screen and helps inform the player which way to turn to get them in the view again. my game has full 3d movement so it has to work with all possible rotations. I've almost got it working I'm just having trouble with constructing the quaternion that allows me easy access to the values I need. My current quaternion doesn't seam to take the roll into account correctly as so doesn't output the correct vector
(comments are locked)
|
|
In the end replaced the whole idea with a pointer instead that is only a few cm [0.1] units big and floats a meter or so in front of the camera pointing to the target and moving towards it by a small degree. Also I deactivate the mesh render if the Vector3 angle between its pointing direction and the cameras forward vector are below 30 so it doesn't take up screen space when the target is obviously visible. If the target is directly behind you the pointer looks larger as its closer to the screen and points directly towards the camera.
(comments are locked)
|
