How to get inputobject.position on console?

That fixed the problem with the grabbing however the console still has a problem. the cursor is still stuck and it cannot be anything to do with the ray being obstructed as it works on PC and there’s a folder containing all the characters and stuff to be ignored.

function GetMousePoint()
    local viewportSize = Camera.ViewportSize
	local UnitRay = Camera:ViewportPointToRay(viewportSize.X / 2, viewportSize.Y / 2)
	local ray = Ray.new(UnitRay.Origin, UnitRay.Direction * 300)
	local Target, Position = workspace:FindPartOnRay(ray, game.Workspace.TargetFilter)
	return CFrame.new(Position, Position + Camera.CFrame.LookVector)
end

	function CamHandling:InputUpdate()
		--CAMERA LOOK
		
		local LookPoint = GetMousePoint()
	    local CameraDirection = Root.CFrame:toObjectSpace(LookPoint).lookVector
			
		if Neck then
			if Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
	        	Neck.C0 = CFNew(0, YOffset, 0) * CFAng(0, -asin(CameraDirection.x), 0) * CFAng(asin(CameraDirection.y), 0, 0)
			elseif Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
				Neck.C0 = CFNew(0, YOffset, 0) * CFAng(3 * math.pi/2, 0, math.pi) * CFAng(0, 0, -asin(CameraDirection.x)) * CFAng(-asin(CameraDirection.y), 0, 0)
			end
		end
		
		game.ReplicatedStorage.Look:FireServer(Neck.C0)
		
	end

That’s the code so far if it helps spark an idea.

Also, I really appreciate you helping me you’re amazing!

Let’s continue in DM so we don’t spam the forums. :stuck_out_tongue: Once done I’ll put the solution in this post as an edit.

EDIT: The issue was related to using the wrong input type in InputChanged.

1 Like

Gotcha :smiley:
(30 characters)