How do I reference a component from one blueprint to another?

I am attempting to script a simulation for VR. I have two parts that I need to assemble together. Both parts are blueprints that have sphere components with sockets attached to them so when they overlap they will snap together. Pictured is what I have, how do I reference the Pipe Sphere in my Brake Sphere blueprint?

The most obvious way: you can use OtherActor and OtherComponent inputs of the event to access the other actor that has overlapped with this one. You can cast these parameters to Brake Sphere and get the Pipe Sphere component.

You have 2 options

  1. Cast the object you want example: Cast To FirstPersonController and get the values.
  2. Make a variable and reference that variable to the object you want then you can drag the variable you make into the blueprint and you have the reference.

if you want more examples or screenshot Tell me.

a screen shot would be great, im still learning

Hope this helps you :slight_smile:

Check out the first video on “Casting” and video #25 on “Creating References”. I think they will help you understand what you need to do. For a “component” reference you would just need to type in the name of the component once you have a reference to the parent BP instead of the variables I pull out in the videos.

These videos are a huge help, the casting video alone solved my problem. Thanks again!

thanks for taking the time to educate me, much appreciated

Glad the videos were helpful :slight_smile: