the arms are cloned in to the character by a serverscript
local VRService = game:GetService("VRService")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local HeadScale = 1
local Camera = Workspace.CurrentCamera
local Player = Players.LocalPlayer
local Character = Player.CharacterAdded:Wait()
wait(0.2)
local LHand = Character:WaitForChild("LArm")
local RHand = Character:WaitForChild("RArm")
wait(1)
if not VRService.VREnabled then
script:Destroy()
end
Character.Humanoid.Parent = game.Lighting
LHand.CanCollide = true
RHand.CanCollide = true
game.Lighting.Humanoid.Parent = Character
Camera.HeadScale = HeadScale
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = Character:WaitForChild("Head")
RunService.RenderStepped:Connect(function()
local HandSize = RHand.Size
local HandOffset = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0) * CFrame.new(0, HandSize.Y / 3, 0)
local UnCalcRHandCFrame = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
local UnCalcLHandCFrame = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
local RHandCFrame = (Camera.CFrame*CFrame.new(UnCalcRHandCFrame.p*HeadScale))*CFrame.fromEulerAnglesXYZ(UnCalcRHandCFrame:ToEulerAnglesXYZ())
local LHandCFrame = (Camera.CFrame*CFrame.new(UnCalcLHandCFrame.p*HeadScale))*CFrame.fromEulerAnglesXYZ(UnCalcLHandCFrame:ToEulerAnglesXYZ())
Camera.CFrame = Character.Head.CFrame
RHand.AlignPosition.Attachment1.WorldCFrame = RHandCFrame
RHand.AlignOrientation.Attachment1.WorldCFrame = RHandCFrame
LHand.AlignPosition.Attachment1.WorldCFrame = LHandCFrame
LHand.AlignOrientation.Attachment1.WorldCFrame = LHandCFrame
end)
Update: i have fixed the object pushing issue by making the attachments that track the controllers be parented to an anchored part. Idk how that fixed the pushing issue but it did.
Only thing is when moving the arms still have a little delay and still shake.
Maybe don’t use align position then, and instead just set the cframe of the hands every frame? Preferrably using RunService:BindToStep()? I made a VR game before, I forgot what method I used.
the problem with not using align position is that the hands dont have physics like stop when they touch a wall unless there is a way to work around that.
i did see someone use align position and not have this issue but i cant find how they did it
yea it could be a roblox bug but its unlikely because the CoreGui also shakes when testing the vr sandbox place and the hands dont shake there. Its brobably just my bad code but i cant find what is wrong with it