BT: Get the reference of a component

Hey, I have trouble getting the reference of a component of an object placed in my level, inside a behavior tree.
Actually im using a Task which can find the position of a building according to the “building class” we choose :

But, i want my actor go to the Scene Component of this building, i tried this but it don’t work, the “GetWorldLocation” return the Root Location of this building instead of the Scene Location:

Of course, i have a Scene Component attached to the building like this :

239470-screen03.png

How should I get the location of a Component (and not the actor itself)?
Regards, .

try using local or relative location maybe?

Like in the first screen ? The problem is that the Scene isn’t at the same location on each buildings

I’m pretty sure the root component’s location is the same as the Actor’s Location, try using that instead of fetching the RootComponent’s location.

Yes it is, but how can i optain the location of the actor’s Component ?

Well, the way you did looks about right, but you can simply GetActorLocation and it should work just the same without issues.

Yes, it’s a different way to script what i did in the 1rst screen. My problem here, i need to get the Location of my SceneComponent, like i want to achieve in the 2nd screen, but it don’t work …

But why do you need to get the location of the root component, what’s the difference between getting your root component’s location and your actor’s location?

There is no difference, it give the same result. I only need the Location of the SCENE Component of my building. It’s a custom scene i placed in the entry of the building. So my AI can go to the SCENE, to reach the entry instead of simply going at the ROOT location of this actor.
So, is that possible to get the Location of a Component, inside an other blueprint like in my post ?
Regards

There was 2 scene component, so GetComponentByClass return the first one instead of the one I needed. Quick fix : use GetComponentsByClass instead, then get(1).