How would i be able to achieve this camera & raycast to a gui?

I’m working on a WWOII-style game and I need to customize it for mobile.

My idea was to go the same route as D-Day where they use ContextActionService, a crosshair and an over-the-shoulder camera.

My questions:
1) How would I achieve this kind of camera?
2) How would i be able to raycast using a crosshair (which is a gui)

I’m pretty educated on ContextActionService and stuff so only need help with the above questions.

Picture:

Thank you in advance.

the camera is a shoulder camera, google how to make one of those

the raycast can be done by seting the origin to be the barrel of the gun and the crosshair doesnt matter, im assuming thr crosshair will always be in the middle of your screen so all you need to do for the direction of the cast is

computer: mouse.Hit.p
mobile: workspace.Camera.CFrame.LookVector

1) How would you achieve this kind of camera?
I think this is the camera like shiftlock?

2) How would you be able to raycast using a corsshair?
You can use this script given below:

local UserInputService = game:GetService("UserInputService")

local mousePosition = UserInputService:GetMouseLocation()
local camera = workspace.CurrentCamera

local function MouseRaycasting()
	local mouseRay = camera:ViewportPointToRay(mousePosition.X, mousePosition.Y)
	local raycastResult = workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 1000)
	
	return raycastResult
end

Wtih raycastResult.Instance, you can get the part that the cursor is clicking/hovering.

I wish my suggestions will be useful.

Thank you @blorbee and @Deciq_z for your suggestions. I’ll get back to this thread when i get the time to test this out!

You probably are looking for something like this for the camera How To Make Touch Screen/Mobile Device Screen Shift Lock Button/How to Enable Shift lock while Clicking With Different Buttons

Try setting the Humanoid property CameraOffset and locking the cursor with UserInputService.

I have not tested this behavior.