Hey! I’m looking to get the direction a player is facing in first person on mobile. I can’t use Head.LookVector since I need the Y-axis to be included.
Here’s how it functions on PC:
Excuse the lag, but as you can see, it takes into account the Y-axis.
Here’s how the targeting script currently works on PC:
local mouse = UIS:GetMouseLocation()
local ray = game.Workspace.CurrentCamera:ViewportPointToRay(mouse.X, mouse.Y)
return ray.Origin + ray.Direction * 10000
The problem is that when this is done on mobile, the player’s mouse location is on the movement buttons and not in the center of the screen, unlike how it is on PC.
All help would be greatly appreciated!