Forcing ShiftLock while allowing free character movement

Hello!

I really fell in love with this how this game handles their shift lock!

Any ideas how someone could go about replicating this?

It allows to character to still move 360 degrees, almost as if the character becomes independant from the camera, and the camera still locks the mouse towards the center of the screen.

2 Likes

There is a property in Humanoid called CameraOffset.
Every time the Character get created you just change it to something like Vector3.new(0,0,5).

You could achieve this by changing the mouse behavior to lock center, and also as a bonus tip, you could update the mouse icon.

local UserInputService = game:GetService("UserInputService")

UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
UserInputService.MouseIcon = "rbxassetid://" -- whatever you want it to be
1 Like

I already know how to make a basic shift lock system, the problem is with doing the CameraOffset it creates a weird effect when you turn as your character center is offseted. I want whats shown in the video to happen in game.

I’m going to try making my own custom camera movement, I will update the post if I find the solution,

1 Like

Couldn’t figure out a solution.

Regarding the CameraOffset and LockCenter solution.

When using them you get this:

Which is not what I was wanting, not similar to the video.

1 Like

Still looking for a solution.

I know how to make a default shift lock. If you remove the CameraOffset property and just set it lock center, it’s pretty much exactly how I want it, I just need a way to offset where the center of the screen is from the character.

1 Like

Oh, I forgot to clarify, you have to set the mouse behavior to lock center every heartbeat or renderstep (runservice)

local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

RunService.RenderStepped:Connect(function()
	UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
end)

UserInputService.MouseIcon = "rbxassetid://" -- whatever you want it to be
1 Like

That is not true..

I don’t mean to be rude but I’ve said before I already know how to make a default shift lock, and I’ve already got a LockCenter system in place. I am trying to OFFSET the LockCenter without using the CameraOffset property because it comes with a weird movement effect.

1 Like