Can anyone help me with figuring out Camera Manipulation and its Math because… this is genuinely so hard to figure out… ![]()
I’m making a… Danganronpa Inspired game, and honestly I’ve started already with figuring out the camera manipulation going to the avatar’s body, but the thing is… I’m directing the Camera to a Ragdolled Body to which the position might be different and I don’t know how to set it up properly… can someone help me out
function module:BodyDiscover(...)
local PlayerRootPart = LocalPlayer.Character.HumanoidRootPart
local PlayerTorsoPart = LocalPlayer.Character.Torso
local DeadTorso = ...
CoreUI.DuringGameplay.ScreenInformation_Event.Visible = false
TweenService:Create(Objects.TransitionFrame, TweenInfo.new(1, Enum.EasingStyle.Cubic), {Transparency = 0}):Play()
currentCamera.CameraType = Enum.CameraType.Scriptable
for _, BodyDiscoveryPart in workspace:GetDescendants() do
if BodyDiscoveryPart:IsA("Part") and BodyDiscoveryPart.Name == "BodyDiscovery" then
BodyDiscoveryPart:Destroy()
end
end
task.wait(1)
currentCamera.CFrame = CFrame.lookAt((PlayerRootPart.CFrame.Position + PlayerRootPart.CFrame.LookVector * 2), Vector3.new(PlayerTorsoPart.CFrame.Position.X, PlayerTorsoPart.CFrame.Position.Y, PlayerTorsoPart.CFrame.Position.Z))
Objects.BodyDiscovery:Play()
TweenService:Create(Objects.TransitionFrame, TweenInfo.new(1, Enum.EasingStyle.Cubic), {Transparency = 1}):Play()
local TweenPlayer = TweenService:Create(currentCamera, TweenInfo.new(2.6, Enum.EasingStyle.Cubic), {CFrame = CFrame.lookAt((PlayerRootPart.Position + PlayerRootPart.CFrame.LookVector * 9), PlayerTorsoPart.Position)})
TweenPlayer:Play()
TweenPlayer.Completed:Wait()
local TweenToBody = TweenService:Create(currentCamera, TweenInfo.new(0.5, Enum.EasingStyle.Cubic), {CFrame = (DeadTorso.CFrame + DeadTorso.CFrame.LookVector * 15)}) -- This is where I'm having troubles with.
TweenService:Create(Objects.TransitionFrame, TweenInfo.new(1, Enum.EasingStyle.Cubic), {Transparency = 0}):Play()
task.wait(1)
currentCamera.CameraType = Enum.CameraType.Custom
Objects.BodyDiscovery.Ended:Wait()
Objects.GameEvent:FireServer("Body Discover: Finished")
TweenService:Create(Objects.TransitionFrame, TweenInfo.new(1, Enum.EasingStyle.Cubic), {Transparency = 1}):Play()
CoreUI.DuringGameplay.ScreenInformation_Event.Visible = true
end