How can I use a component within a blueprint inside another blueprint?

As per the title, lets say I have a camera component in blueprint 1 and I want to use that camera component in blueprint 2. How can I achieve this?

Would greatly appreciate an answer.

Thanks for the answer, if you dont mind running me through the process as Im new. What would be the next process?

Quite simply: You add the camera component. If you’re having problems setting it up UE4 lets you copy it between blueprints.

If you mean actually utilize another actors camera you need to make a reference to that component. Just drag it into your event graph, drag out the pin, choose promote to variable and expose it. You can then access it in any blueprint.

Hello, we use communication with actors using of references to get actors property. There are several blueprint communication techniques using of Event Dispatchers, Blueprint Interfaces, Using events and so on.

In this example i will use direct communication using reference variables.

267088-ue4editor-2019-01-31-02-43-48.png

In ActorOne blueprint we created a new variable named as ActorTwoReference. Type of variable is ActorTwo Reference and setted public(instance editable).

267089-ue4editor-2019-01-31-02-44-57.png

In ActorTwo we have camera actor component.

267090-ue4editor-2019-01-31-02-59-17.png

I put these two of actors into the current level. ActorOne is on left-side and ActorTwo is right-side. By clicking ActorOne in the level, i can set ActorTwoReference refers to the ActorTwo in the level.

Now ActorOne has valid reference named as ActorTwo.

I can use ActorTwoReference in my blueprint as calling camera component like this

So I can access camera component of another actor.

I believe he is trying to use a sniper scope visible to another character or something like it.

Thank you very much for that detailed answer. That clarified what I didnt understand. However, my issue now is that I cant attach that to my new view target value.

Data types of Sniper Camer and New View target is compatible? For checking compliance, drag Sniper Camera pin to New View Target and see the output tooltip.

Kosar, Just to confirm. You would like to make another camera in another BP the default camera view for example while using a sniper scope.

If it is changing cameras, I posted this answer a little while ago, which also might help.

Hi there, I followed what you said and I see the trigger happen but it doesn’t possess the camera still.

1 Like

Just a bit of context. I want Sniper camera to be possessed when the trigger I have set for it to happen. Sniper camera is in a different blueprint which you can see in the Get All Actor of Class.

Thats correct

So your camera is in the BP Projectile? So it follows the bullet to the impact point?

If you want to swap to another cam, one way is doing it in your level blueprint via a an event and the node “Set View Target With Blend”, that will allow the camera to transition from your character camera to the actor camera rather than switch right to it. Could add a nice effect to the bullet cam, that it blends over to it. You can also adjust the blend in that node to make it instant.

As for the event triggering it, you want the bullet camera active when the bullet is set to hit the enemy, correct? That could be a bit more tricky, like a line trace or something so you know it will hit, but it CAN technically still miss with movement… unlikely in a singleplayer though.

If you want to swap to another cam, one way is doing it in your level blueprint via an event and the node “Set View Target With Blend”, that will allow the camera to transition from your character camera to the actor camera rather than switch right to it. Could add a nice effect to the bullet cam, that it blends over to it. You can also adjust the blend in that node to make it instant.

As for the event triggering it, you want the bullet camera active when the bullet is set to hit the enemy, correct? That could be a bit more tricky, like a line trace or something so you know it will hit, but it CAN technically still miss with movement… unlikely in a singleplayer though.

Hi there,

Hope you’re doing well.

I am also trying the same thing.
I have an actor blueprint that has a static mesh that I want to change the material of, when I click a UI button for VR. I have a separate UI widget blueprint that I created. I have the widget actor for this UI button inside the same actor blueprint I have the static mesh inside.

Now I’m trying to connect the UI widget blueprint with the Actor blueprint.
This image below is what I tried. May I know if this is correct or if there might be a better way to do this. Thanks.