Smooth camera position in third person

No, I do NOT want to use lerping or tweening.

Alr so, I want to smooth my camera movement like in this game: [UPD] Blood Engine - Alpha Test - Roblox
As you can see, the camera follows your character with a slight delay when you’re in third person.
I’m not very good with springs, I only use them for recoil.

What I have in mind rn is to set the spring goal to the old camera cframe position, then update the camera on every frame to the spring current position.

Any help is appreciated!! ;p

1 Like

why would you choose to not use lerping or tweening…
you can use this function to assist, it acts like a spring and uses math.
the start would be the previous cam cframe, the stop would be the current cam cframe, the alpha is a number between 0 and 1

function spring(start, stop, alpha)
    return start + alpha * (stop - start)
end
2 Likes

maybe try using this module: https://github.com/Sleitnick/AeroGameFramework/blob/master/src/StarterPlayer/StarterPlayerScripts/Aero/Modules/Smooth/SmoothDamp.lua

note it’s not made by me, but i have used it before.

1 Like

Lerp will look very weird and is not what i want the camera to look like, springs are way smoother.

1 Like

Alr ill check it out, ill let you know if it is what i was looking for.

1 Like

lerp is a mathematical function, how it works is up to you. it’s very useful. look into delta time.

Pretty sure blood engine uses spring rather than lerp or tweening, not only that but instead of the camera falling back behind, it goes ahead, this is most notable with walking forwards or backwards.

1 Like

okay, thanks, any ideas on how would i make the spring set the position instead of accelerating tho? im not really familiar with spring modules

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.