this creates a problem, as it might give one platform an advantage over the other.
is there a way to force it to be one or the other? (preferably on the 3/4ths up one)
If you want it to be always centered, you will have to disable the cursor (Documentation - Roblox Creator Hub) and put the cursor image as an ImageLabel in the center of the screen.
local function castMouse(ignoreList)
local mousePos = UserInputService:GetMouseLocation()
local ray = workspace.CurrentCamera:ViewportPointToRay(mousePos.X, mousePos.Y)
ray = Ray.new(ray.Origin, ray.Direction*5000)
return workspace:FindPartOnRayWithIgnoreList(ray, ignoreList)
end
Swap out GetMouseLocation for the middle of the viewport for gamepads.
This is a bug that used to happen on PC too but not as much, I’m not sure if it happens anymore, but placing an imagelabel in the middle wouldn’t fix it as Mouse.Hit would still be way above the middle of the screen making the bullets not accurate.