Im trying to make an auto aiming gun but i dont know how to make the camera snap to a part or model’s visible area even when not viewing the center of the part, heres a example cause my explanations are bad
Part gets visible on screen
Aim there:
Not there:
I basically dont know how to detect another visible area of a part from the camera than the center and snap into that visible area
1 Like
Don’t exactly know if this will work, so please correct me if I’m wrong.
You could try detecting if the box is on the player’s screen with WorldToViewportFrame, and calculate the distance between the mouse and the box. If the mouse is close enough to the agrodistance, then you could turn the player’s camera CFrame by a couple of degrees/radiants. Hope this helps
1 Like
i Think its WorldToViewportPoint, ill try using that for now and if i cant make the gun yet ill wait for another reply thanks
still cant ill wait for another solution