Raycasting problem

first of all i mean no offense… I’ve started using UE4 not so long ago, after working with Unity and faced with a lot of problems. I won’t mentioned all that awful experience i had while i was trying to setup my Visual Studio for UE4…
Today i wanted to find out how exactly ray casting working on UE4. I’ve found tons of videos with blueprints (i decided not to use blueprints, only pure coding). And here i’ve found some tutorials that didn’t work for me, and also some examples i didn’t understood.

Yeah, i am totally agree that C# is much easier than C++. But still. In Unity there was

//creating raycasthit object 
 RaycastHit hit = new RaycastHit();
            if (Physics.Raycast(playerCamera.transform.position, playerCamera.transform.forward, out hit, 2f))
            {
                while (hit.collider.tag == "Muhomor") //using hit collider tag
                {

                    if (Input.GetMouseButtonDown(0))
                    {
                          //  do the stuff
                    }
                    break;

                }
            }

And it’s quite simple and understandable. Hit collider tag is used for “defining” collider object.
In UE4 i’ve found FRaycastHit (which was shown as undefined in my IDE) but i didn’t get: what to do next =(

Could you please give me a little bit of explanation. I would be really appriciated

Hello! In UE there is a family of methods starting with Linetrace and Sweep words in UWorld class (UWorld | Unreal Engine Documentation). Linetrace things are just a ray cast analog, and Sweep things are shape casts…