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:
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).