How to make a UI element track a 3D object on screen?

I want to make a custom crosshair for my gun system that tracks where the barrel points to, and moves the crosshair to that position. How can I replicate how the game below pulls this off?

right now, I use a rudimentary billboard gui to show the player where the bullet will go. But it gets hard to see at far distances, which will be a problem later on as the maps are wide and open. If anyone can help me with this, I’d appreciate it!!

1 Like

raycast the bullet barrel in the direction it is pointed then use cam:WorldToScreenPoint() to set a screengui to the position

this idea is actually really cool it would be cool seeing more games use it lol goodluck

1 Like

I tried it out and it works! I knew I’d probably use something like WorldToScreenPoint(), I should’ve checked read through docs a bit better cuz I thought I had to use a different one. Thanks!!

1 Like