Hey everyone, i’m currently working on my own VR Engine and i’m currently having a huge bug i’ve been trying to fix for weeks.
Basically, here’s the problem in short: The VR Camera is set on top of the Root part of the character, but i need the root to also move according to the vr camera’s X & Z axis. (Basically, the Camera follows the root and the root follows the camera.)
But doing this result in my character going extremely fast in the direction i lean my head in. Here’s the code of both the camera and the root so you guys know what i’m talking about:
Code bellow is in a RenderStepped Loop
Camera.CFrame = CFrame.new(Root.Position + Vector3.new(0,Height,0)) * CFrame.Angles(0,math.rad(Rotation),0)
Root.Position = Vector3.new(RenderCFrame.Position.X, Root.Position.Y, RenderCFrame.Position.Z)
-- RenderCFrame is equal to Camera:GetRenderCFrame()
Here’s what happens in game:
The root part is the transparency grey cube shown in game, and i don’t think you have to worry about the other stuff. I already tried everything, i’m sure the problem isnt connected to ingame physics or others.
I’m really desperate for help as i’ve been stuck on this for so long. Help would be really, really appreciated. Please, if you are a VR developer and stumble upon this post, even if you don’t know how to fix this problem, leave your thoughts on what you think is the issue. It would be already pretty useful.