Hey everyone. Recently ive been dabbling in CFrame more to create more fluid camera systems for my games, more recently ive used tweenservice to tween the camera every frame behind wherever the player is flying. This however has led to stutter that is very visually unappealing.
I remember reading somewhere the damping would fix this issue, so im looking for advice on how i can use a damping module (doesnt matter what one) to achieve a rotational and positional CFrame for my players camera.
Thank you for reading and i hope someone can get back to my with advice.
Camera.CFrame = PlayersTorso.CFrame * CFrame.new(0,8,-15) * CFrame.Angles(0,math.rad(180),0)
here is an example of the kind of CFrame id be using.
You can use a damping module if you want a more advanced version of damping, but if you want it to sort of just move along smoothly, instead of setting Camera.CFrame set a variable that will be your target camera CFrame, such as
targetCFrame. Then, every frame instead of just setting your camera to this CFrame you have a preset progression percent, say 0.25. You would set your camera to
Camera.CFrame = Camera.CFrame:lerp(targetCFrame, progression) This would move your camera 25% from its current position to the target position, which would be a shorter and shorter distance until it is on your target position.
Hope this helps!
Hey, let me try your method just to make sure, but im 99% certain that :lerp also gave the bad stuttering effect on the player.