I need help on this Character LookVector

Hello, I am trying to change Character LookVectors withing Mouse Position to make something like this: Screenshot by Lightshot or something a little bit different but kinda similar to Roblox Shift Lock. How do I make it? I would use RunService.RenderStepped for camera and well, I can’t find any article to change Character LookVectors and Mouse Position, may I get some help :slight_smile: Screenshot by Lightshot how it should look :confused:

In a RenderStepped call do this:

local camera = workspace.CurrentCamera
--RenderStepped
local offset = CFrame.new(0, 5, -10) --how far away from the character?
local origin = (HumanoidRootPart.CFrame * offset).Position
local target = Mouse.Hit.Position
camera.CFrame = CFrame.new(origin, target)

Atm im on phone but soon i’ll test it, thanks you somuch:)

i am not entirely sure what you mean by changing the characters’ look vector, as it can not be changed directly, but rather by manipulating the characters’ CFrame and or orientation. It seems like what you are trying to do, is to make a 3rd person camera (for shooter games), so there are a few things on the Devfourm you can look into, this or even This one

Well, How would I make like, a Shift lock, like, how can I force a player to shift lock just that?

Here are some resources:

Use a localscript to access the humanoid in the player character, then in “CameraOffset” set the value of X to 1 or 2, that will have it on the shoulder instead of centered, sorry I was on a trip for a day and couldn’t answer back.So How would I change cameraoffset? I dont know srry

i’m not exactly sure what you mean. To change the offset, you would change the associated vector position(you would add or subtract the camera position, if that makes sense), with most of the resources i linked above there should be a way to do that.

Well, I guess i’m not good with this, I’m just going to make something, add a part and change camera subject ;p

it also might be a good idea to check out those posts i linked in my first post, if you haven’t already (in this topic), nonetheless good luck on your project/game!

Thanks, but I really don’t quite understand, I also speak spanish so is kinda hard :frowning:

1 Like