Get 2d gui position from 3d position (SCP door hand icon)

How can I recreate the hand positioning from this gif?

https://gyazo.com/265a436844bd8078ea4184f4ea6599c7

When you turn away, the hand still shows at the side of the screen which is what I’m looking for, but not sure how to achieve.

This is what I have so far with a billboard GUI, but I still would like it to show at the side of the screen for a player toggling the door behind them.

https://gyazo.com/d1cdbde5b3c230bb9ca17f66e5d3c699

2 Likes

There’s a resource for “keeping” BillboardGuis in-view when turning away from them. A resource has been made on doing things like this: you would be able to use it to understand what this is and how to do it. It does have code so you can salvage it to meet your needs (e.g. making the markers disappear when you’re a certain distance away from them).

1 Like

You can use :WorldToScreenPoint

1 Like

You should use (as suggested above) WorldToViewportPoint or WorldToScreenPoint (the code for these are most likely shared by BillboardGuis).

I’d also highly recommend reading the Camera docs for some really useful 3D functions! There are some extremely useful functions in there.