Camera Movement Relative to Facing Direction?

I want to setup a VR Movement System, based on which direction the user looks, although upon attempting this, it only moves based on the Global Axis, although other parts move based on which way they face.

This is what I’ve done

local Cam = game.Workspace.CurrentCamera
Cam.CFrame = Cam.CFrame*CFrame.New(movedir)

movPos is a Vector3 variable based on the X and Y on the left controller, which is setup as X,0,Y
When I attempt to do part.CFrame = part.CFrame*CFrame.New(Vector3.New(1,0,0)) on a plain part, it moves relative to the X Axis for local Part.

This is what I want to get.
https://i.gyazo.com/5f7426e821daf486ec9f321c5aba84a2.mp4
This is what I get.
https://i.gyazo.com/71e8a208d5ca81f33cb96f1b9eb39836.mp4

I’m not that great with CFrame so any help would be appriciated.

1 Like

I don’t know anything about VR Scripting, but maybe try using Body Movers instead of CFrames?

1 Like

I’ll look into seeing if that works with cameras or if I can get it to work with the camera’s cframe, although I’m not sure if that’ll work.

Use look vectors with body movers I suggest, but you can use look vector and cframe
example:
while wait do
wait()
head.CFrame = head.CFrame+head.CFrame.LookVector*10
end
you can edit it always but it’s just an example

2 Likes

Worked nicely!
Cam.CFrame = Cam.CFrame+HE.CFrame.LookVector*movedir.Z
I’ll look into using rightVector aswell. Thank you!

2 Likes