I am wanting to create a “zoom in” feature that zooms the camera in to a part based on the position of your character and a given radius. I’m not too sure how I would go about creating this, but I have provided a drawn out image of what I’m looking for.
I thought of a solution which is creating a unit circle around the destination part, and calculating the magnitude of the player-destination, however, I got stuck at actually finding the points with those values. I also looked in to Vector3:Cross() and Vector3:Dot(), but had a bit of trouble incorporating those.
Any help or guidance would be extremely appreciated, thank you!
Thank you so much, this helped a lot! I didn’t realize it was this simple, I’m going to do my research on Vector3.Unit so I can better understand the code. From my current understanding, it ‘extends the vector3’ (in simplest terms).
Well, (Position - Position) or (Vector3 - Vector3) is a better way to put it, will give you the direction-distance between two vectors. Unit makes it a length of one, which means it’s a direction (directions are vectors with a length of 1). You’re treating Part as the origin location, so you’re basically saying from Part, in the direction ((Player.Position - Part.Position).Unit) of the player at Radius distance (studs).