My question maybe silly as much as getting actor reference is largely documented (and quite basic) overall but I can’t manage to have something working.
The situation : I’m trying to have a BP get overlapping actor reference and send it to another BP through blueprint interface with an actor ref input. The first being a trigger and the later a level camera, hence switching from player to level camera with look at (that’s the issue). But the trigger BP doesn’t return any actor.
I’m also trying to do as much as possible in the cam blueprint, so the trigger can be a more generic one. I believe that’d be doable if I can get the actor reference to work
Any help appreciated
If the camera has no collision, it will not overlap an overlap query. You may wish to add a trigger/detector sphere or something to the camera.
If you’re specifically looking for cameras, you may be able to “get all actors of type camera” instead (as long as there aren’t too many in the world!) and check if any one is within the trigger using regular math.
I’m not sure to get your answer, as the trigger BP successfully talks to the camera BP ?
It’s only that it doesn’t get the overlapping actor as actor ref (and pass it to the camera for look at)
You might be able to get more using Blueprint interfaces. I find them to be quite versatile seeing how you can call functions made in your Blueprint Interface.
What to do:
-Creating an interface, assigning it to the player.
Using a ‘Does Implement Interface’ node.
Feel free to read more about interfaces here:
Assign to your character BP
Using ‘Does Implement Interface’
Thanks, but so far it’s all in my original post (on 3rd edit at least, maybe the detailed blueprints and precision that I use blueprint interface didn’t show up ?)
In your example, how do you tell the TestCameraActor what actor to look at ?
The only way I found so far is to get class actor = BP_ThirdPersonCharacter in the cam BP but it’s too specific, if I wanna target another actor for instance
After a few try I feel like I’m almost there. I’m trying to make everything happen in the cameraBP, and for now I can switch between player and level camera, using get player controller as you illustrated @Polite_Muon (I dropped the idea of passing the overlapping actor ref as it seems the Set view target with blend node only takes player controller as input anyway). When returning to player though, the camera is set on its center. And no luck with look at so far, I don’t get errors anymore but the camera just rotate to the sky and stops.
NB: I’m trying to paste the embeded code from Blueprinteu in here, but it doesn’t seem to display ?
Nailed it ! The main issue was I didn’t understand exactly how Set view target with blend works.
The solution for a level cameraBP with look at, triggered with an independent triggerBP :