I am trying to make something similar to telltales, Until Dawn, and life is strange type camera system, where the camera follows player but in a dolly track type of way, rather than immidietly going to player.
I have tried many things, I have tried lerping between waypoints, which ever is closest to player! I have tried regions! Literly I am lost on this, because roblox does not have a similar feature.
I have tried looking everywhere on roblox dev forums and found nothing. I did find something similar in other engine though, here is a scene from Unity dolly track system, and what it should look like: Using Cinemachine: Track & Dolly - YouTube
I am in no way asking people to give me code, I just need suggestions and want people to point me to the right direction.
Please don’t respond to me with something like: “you can change camera types” because that doesn’t answer my question. (Not to be rude in any way or form.)
If you plan on having the camera freely move around then I would suggest you to set the camera type to scriptable and just lerp it to your desired position each frame so that it looks smooth.
I know I have to make the camera scriptable, that doesn’t answer my question though, I can make it scriptable and make it lerp, but lerp to what? How do I make it into a dolly track?
Refer to my text above:
Please don’t respond to me with something like: “you can change camera types” because that doesn’t answer my question. (Not to be rude in any way or form.)
Maybe do something like have it be based on their normal like
function updatePosition(current, cam)
local offset = cam.CFrame.LookVector * (current - cam.Position).magnitude
return cam + (offset - cam) * 0.5
end
while true do
updatePosition(current, cam)
wait()
end
Now this should work fine for just the position part, maintaining the look direction (not sure if thats not what you want, if you want like some gta v crap)
Don’t mean to be disrespectful mate, but the code’s math is… lets say not working. When you cam and current what are you refering to? How can you subtract offset by cam, when its not a value type, rather I am assuming an object?
cam is what we calculate our camera should be based on how much we moved our mouse. So say we moved our mouse 500 pixels on x then the camera position should be the past camera position multiplied by that rotational matrix transform where the radian is the ratio of the pixel to the viewport x