How does GetOwner() in raycasting ignore the physical pawn


So im at section 3 (building escape) lecture 86 (archived course) where ben is using raycasting to determine the name of what is in front of him. I get what’s happening, but what’s odd to me is the last parameter for FCollisionsQueryParams()


The last argument should be what is ignored by the raycast which is supposed to be ourselves, but here’s the thing doesn’t GetOwner return the player controller? if that’s the case it not returning the pawns body, how is it that this code works then?

What is the component attached to?

The player

So what would GetOwner return?

Doesn’t getowner return the root component of the object? In the players case the root component is the player controller, right?

  1. The player controller is not the root component of the player
  2. It does not get the root component, that’s what GetRootComponent does

GetOwner gets the owning actor. In the case of components that would be the actor it’s attached to.

Yeah my bad, I must have gotten confused with another function.
Thank you so much

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms