How to make a compass in 3d?

I have a thick, dark, forest level. and im realizing its very hard to navigate. some kind of on-screen compass would be great. not sure how to do that.

what should the compass point at? Does the camera rotate? Otherwise, wouldn’t the compass always point up?

fundamentally, a compass would be something like this:
image

it you did a really far point, like 500,-100000 then it would basically have no rotation from side to side of the screen.

The compass should show the direction the first person camera is facing, I have it almost working, but it loses accuracy the more you move the mouse

image

You can see what i have here (the door is West)
https://i.imgur.com/uRG6ezR.mp4

How can I fix it? I tried your suggestion, but it dosent do anything, because I use the Pointer Lock extension to move the camera in first person

i assume this is in 3d. Can you use the Z? rotation of the first person to indicate the compass? Something like this? (sorry, i haven’t done any 3d)
image