Is it possible to "simulate" roblox camera movement?

I was wondering if it is possible to rotate the player camera around the player character in the same manner as when you hold RMB and move your mouse, but through local script instead.

Although I realise that that I can just set it’s CFrame and rotation myself, but calculating the exact position for it to be same as the roblox camera might be a bit problematic, so maybe if there is a way to “simulate” the mouse input to the camera, that would be great.

I will appreciate any suggestions or help!

1 Like

What are you trying to accomplish with this?

2 Likes

I want to make a camera to be rotateable only by moving the mouse instead of having to Hold RMB

2 Likes

Is this any help?

2 Likes

I assume this is what you want:

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local PlayerScripts = Player:WaitForChild("PlayerScripts")
local PlayerModule = PlayerScripts:WaitForChild("PlayerModule")

local CameraInput = require(PlayerModule.CameraModule.CameraInput)

CameraInput.getRotationActivated = function()
	return true
end
2 Likes

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