I am working on a Camera System that can track a player’s movement while moving between two control points. What would be the best way to accurately track multiple positions?
1 Like
Forgot to mention, the purple brick is an example of the camera’s perspective
p0 = greenPart.Position
p1 = redPart.Position
k = 0.5
p = p0:Lerp(p1, k)
If p0
and p1
are the start and end positions, and k
is a value between 0 and 1, then p
will be a position between p0 and p1. For example, k = 0.5
gives a position precisely between the two. Here’s the documentation for Vector3:Lerp(Vector3, number)
To point the camera toward the player:
cam.CFrame = CFrame.new(p, characterPosition)
Sets the cam at position p
, looking toward characterPosition
.
Documentation for CFrame.new(pos, lookAt)
The code worked out well. Tysm!
this should be help, and not feedback
I must have clicked the wrong category on accident. Whoops!