How to get reference to instance of BP upon collision?

Hi everyone, I’m coming from Unity and struggling to translate “OnCollisionEnter()” and getting a “this.gameObject” type reference using Blueprint.
I am not trying to get a reference to the object that crashed into my blueprint - I am trying to get a reference to the instance of myself that was collided into.
Why? Because I want to run into it once and for it not to be re-triggered when I exit and enter again.


Perhaps there is a built-in way to do this that I am just missing? There are multiple instances active at any given time and I only want this one instance to have its collision disabled.

Again, sorry that this is probably incredibly obvious to everyone else. Thank you for your patience!

If the logic in your screenshot comes from the character’s blueprint, you shouldn’t pass in Self; instead, you should pass in the collision component:

Expand the “components” section of the variables window on the left. You should be able to simply drag the capsule collider component into the event graph and connect it to the target pin.

Also, Unreal Engine is much larger and more complex than Unity. You’re not going to be able to learn how to use it with trial and error. You should go through all of this section of the Unreal Engine documentation if you’re coming from Unity, and maybe find a beginner course or YouTube series to get you started. This is also a good section of the docs to read through if you’re new to Blueprints: Blueprints Visual Scripting in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community.

Thank you! You were right, I was just having a different bug in my code that made it so the solution wasn’t working initially.

Thank you! I tried that before posting, but thanks to your comment I went back to investigate why this solution hadn’t worked. It was due to a bug in my code! Thank you very much for pointing me in the right direction :slight_smile:

I will go over the documentation again, thank you. I’ve been trying to learn along with tutorials and documentation and I’m slowly getting the hang of things, but it’s the little things that keep tripping me up. It’s incredibly difficult to find good answers when you don’t really know how to ask the questions.