currently, I am developing a port of Gorilla Tag’s locomotion to Roblox. it is going very well, however I’m incredibly stuck on one problem.
My player model does NOT use the default player controller roblox uses whatsoever, and I’m not sure if it plays a part, but if the player takes any steps in real life, the camera will be offset from the player (even in first person!) and given the fact that the game relies on your head lining up with the rig’s head, this leads to a very frustrating & disorienting experience. Watch 2024-09-04 20-28-31 | Streamable
Here is a clip of a player taking steps in real life and having their camera end up on the whole other side of the wall, while their character model is still on the original side.
Any help is VERY greatly appreciated. I’ve already tried adding the head delta from the last frame and the current frame, but nothing helps.
Here is my script to get VR controller inputs without any head fixes I’ve tried:
local VRService = game:GetService("VRService")
local LeftHandPart = workspace.Hands:WaitForChild("LeftHandController")
local RightHandPart = workspace.Hands:WaitForChild("RightHandController")
workspace.CurrentCamera.HeadScale = 2
local character = script.Parent
local gameSettings = UserSettings().GameSettings
gameSettings.RotationType = Enum.RotationType.CameraRelative
local humanoid: Humanoid = script.Parent:WaitForChild("Humanoid")
humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, true)
humanoid.EvaluateStateMachine = false
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
game:GetService("RunService").RenderStepped:Connect(function(dt)
end)
function hands(dt)
if game:GetService("VRService").VREnabled then
local LeftHandOffset = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
LeftHandOffset = LeftHandOffset.Rotation + LeftHandOffset.Position * workspace.CurrentCamera.HeadScale
LeftHandPart.CFrame = workspace.CurrentCamera.CFrame * LeftHandOffset
local RightHandOffset = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
RightHandOffset = RightHandOffset.Rotation + RightHandOffset.Position * workspace.CurrentCamera.HeadScale
RightHandPart.CFrame = workspace.CurrentCamera.CFrame * RightHandOffset
end
script.Event:Fire(dt)
end
game:GetService("RunService"):BindToRenderStep("hands",401,hands)