Hello Developers
,

I’m new in Unity and i’m trying create shooting game… what i want is swipe camera up, down , left , right when touch my mobile screen and of course the camera should follow the gun when moving
…Also I’m using RayCast to hit an object so i hope RayCast hit direction follow the gun.
RaycastHit hit;
if ( Physics.Raycast (fpsCam.transform.position, fpsCam.transform.forward, out hit, range ) )
{
Target target = hit.transform.GetComponent<Target> ();
if (target != null)
{
target.TakeDamage (damage);
}
}
ANY IDEA OR ANY BETTER IDEAS
Thank you so much