Super Monkey Ball camera tilting

I’m working on a clone of the SEGA game Super Monkey Ball, and as such one of the iconic aspects of Super Monkey Ball is that the map tilts around as a way to move the player around.

This is incredibly unsafe to do in a Multiplayer game so the alternative is to fake it using Camera tilting, so the idea is to set the Camera’s CFrame and rotate it using

function update(dt)
local camera = workspace.CurrentCamera -- Get the local camera
local goalCF = CFrame.new(playerPosition - playerDirection, playerPosition) --Set this behind the player looking at them
local roll = CFrame.angles(xRot, 0, zRot) -- replace xRot and zRot with your tilt angles
camera.CFrame = camera.CFrame:Lerp(goalCF * roll, dt) -- Set the roll after you set the position
end

However the tilt in the X-Axis never feels quite right, it feels like the camera is in the wrong position after it’s tilted downwards. I believe my problem stems from the order of my CFraming. Anyone have a solution to fix this?

2 Likes