I am making a strategy sword fighting game and I want the camera to lock onto the nearest person’s humanoid root part when you are close enough to the player and unlock when you aren’t, how would I go about doing that?
Cameras have a CameraSubject property. I imagine you can change it to lock onto whatever you want, including humanoid root parts.
For the distance calculating, the most straightforward answer would be to just loop through opponents’ humanoid root parts and calculate their distance from the player with the Magnitude vector3 property.
Ok thank you I’m going to try it, it seems promising EDIT: thank you so much i got it working!