Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Movement and rotation troubles in VR?

Asked by 4 years ago

So I have been making my first VR game and I want to be able to move in game

I have the grab script hands head etc but I just cant work out how to move using the thumbpad(htc vive) or the trigger on the controller in the direction your facing

I also need a rotation script

Here are my scripts

  • local script
01wait(4)
02 
03workspace.ThingsHappen.MoveMe:FireServer()
04 
05workspace.CurrentCamera.CameraType = "Scriptable"
06wait()
07workspace.CurrentCamera.CFrame = CFrame.new()
08 
09local VRService = game:GetService("VRService")
10local InputService = game:GetService("UserInputService")
11 
12VRService.UserCFrameChanged:Connect(function()
13    local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
14    local RightHand = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
15    local Head = VRService:GetUserCFrame(Enum.UserCFrame.Head)
View all 33 lines...

server script

01function ItsHim(player, RightHand, LeftHand, Head)
02    workspace.Johna.CFrame = (RightHand)
03    workspace.Jenna.CFrame = (LeftHand)
04end
05 
06function GripGoRight()
07    if workspace:FindFirstChild("GrippedRight") ~= nil then
08        workspace.GrippedRight.AlignOrientation.Attachment1 = nil
09        workspace.GrippedRight.AlignPosition.Attachment1 = nil
10        workspace.GrippedRight.Parent = workspace.ThingsInHere
11    end
12end
13 
14function GripGrabRight()
15    local TheKids = workspace.ThingsInHere:GetChildren()
View all 63 lines...

1 answer

Log in to vote
0
Answered by 4 years ago

This might help you, if you go to roblox studio and open up the VR game you have and go to view-->ObjectBrowser and then scroll all the way down and click on VRTouchpadMode. There are commands that you can write in your script and one of the commands are VirtualThumbstick. I think it is a bool value I maybe wrong, but you would set that to equal true.

Below is a picture of what I am telling you

https://ibb.co/tq1Ny9P

Ad

Answer this question