so I saw on the dev forum that there was a Gyro input type so I wanted to try it out
but when I did using the code sample it didnt work and did nothing
local Brick = workspace:WaitForChild("SpawnLocation")
local Camera = game.Workspace.CurrentCamera
Camera.CameraSubject = Brick
local UserInputService = game:GetService("UserInputService")
UserInputService.InputChanged:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.Gyro then
local rotInput,rotCFrame = UserInputService:GetDeviceRotation()
local rotX,rotY,rotZ = rotCFrame:toEulerAnglesXYZ()
local rot = Vector3.new(math.deg(rotX),math.deg(rotY),math.deg(rotZ))
Brick.Orientation = rot
print("The rotation of the user's mobile device has been changed!")
print("\tPosition",rotCFrame.p)
print("\tRotation:",rot)
end
end)
any help is appriciated!
Edit: found a open source project with the code to do this type of thing heres the link to the project also Mobile "VR" Camera Lock