Lesson 120 - - - Bad Descriptions

Hey Teacher

You have been teaching very good so far and I appreciate it, but I really have to point out that with recent lessons your descriptions have become very vague and I have been getting lost, some things you say we must do but don’t really explain why, in the beginning you were explaining very well, but recently you haven’t, what’s happening?

But I really do appreciate the effort you put into these lessons.
Here are some examples :

Why ??

FCollisionQueryParams TraceParams(FName(TEXT("")), false, GetOwner());

Why ??

GetWorld()->LineTraceSingleByObjectType(
		OUT Hit, // makes sense
		PlayerViewpointLocation, //makes sense
		LineTraceEnd, // makes sense
		FCollisionObjectQueryParams(ECollisionChannel::ECC_PhysicsBody), /// mmm thats confusing
		TraceParams  // Huh ?
	);
3 Likes

I actually feel the same. My first thought were, that my not native english would be a problem in understanding the codes.
But even translating the commands didn’t help much out.

I’m actually testing the new stuff, checking the documentations and read the posts with the hope i get some more information on these things

1 Like

In some cases, I am also having some problems understanding the concepts, but I think that as we are progressing in the course, concepts are being tough. So it is not even possible for them to teach us hard concepts as a cup of tea. To understand the concepts I watch the video 2 or 3 times to clear my concepts, and even after doing that, if my concepts are not being cleared I visit the UE documentation, and finally after all this website is for clearing our silly doubts :joy:
Note:- My English is also weak, so I am also suffering.

From what I have understood:-

FCollisionQueryParams TraceParams(FName(TEXT("")), false, GetOwner());
  1. Above he has written **FName(TEXT(" "))** because TracePrams’ first parameter is asking for the names of **InTraceTag** and he hasn’t declared any **InTraceTag**, so he left this parameter empty. **InTraceTag** are tags from which are given to the special actors so that our pawn picks only those actors having given tags tags.

  2. He has given the second parameter “false” because it is asking if you are using a complex collision or not and it varies according to your Collision pattern.

  3. He has given **GetOwner()** in the third parameter because, it is asking which actor will be ignored while TracingObjects. And I think if you want nothing to be ignored you can simply type **nullptr** then it will ignore nothing.

  4. In the **LineTraceSingleByObjectType()** function he gave **FCollisionObjectQueryParams(ECollisionChannel::ECC_PhysicsBody)** because it is asking for, the List of object types it is looking for, and here he said the function to look for objects having PhysicsBody.

  5. In the **LineTraceSingleByObjectType()** function he gave **TraceParams** because this parameter is a special one, it is asking for Additional parameters used for tracing, and it can vary according to your needs. And here he gave TraceParams because above he designed TraceParams according to his needs.

I am not fully sure about the answer I gave to you because I am also following the course and just finished the Building Escape Section. You can wait until an expert gives a fully confirmed reply to you till then take my answers as a reference.

@DanM did I give him the right answers to his doubt>

Pretty much. A couple notes

  1. There’s a NAME_None constant for this you could use instead.
  2. To expand on that, that is for whether you want to trace simple collision or complex. For example a door’s simple collision is probably just a box around the mesh; if you wanted to do a line trace that goes throw windows within the door mesh then having this argument be false would not allow you to do that (presuming the complex collision has holes for the windows).
  3. If you didn’t want to ignore an actor then you can omit the last argument, it has a default value of nullptr.
  4. Just to note that that constructor for FCollisionObjectQueryParams isn’t marked explicit so you can implicitly construct the argument via just ECollisionChannel::ECC_PhysicsBody furthermore that is an unscoped enum so you can just say ECC_PhysicsBody.
1 Like

Thank you everyone for your replies, I shall take all your suggestions and contemplate.

I have always had trouble learning so this is hard, but I am making my way.

I came here because of that too and curious if I was alone on it. And it is not the lack of English knowledge that is the problem. I have been feeling that now we are just doing thing for doing, without knowing why. Maybe this section, if the concept is that complex, should be split in smaller videos to allow a better explanation.

Privacy & Terms