As with any mouse position, you have to convert the 2D coordinate into one in 3D space by specifying a Z distance in front of the camera for the point, but works the same way no matter where the camera faces:
function Update() {
var v3 = Vector3(Input.mousePosition.x, Input.mousePosition.y, Camera.main.nearClipPlane);
v3 = Camera.main.ScreenToWorldPoint(v3);
Debug.DrawLine(transform.position, v3, Color.green);
}
sry i guess question totally changed :) ur Code Helpfull! +1
sry i guess question totally changed :) ur Code Helpfull! +1
– D3m0nEumm,, we cant just do the CrossHair then i will make the bullet at crosshair Transform Forward
– D3m0nE