Proximity Based Objects without Level Blueprint

Hello there, I am making an object that changes materials as you get closer. I have gotten it to work in the Level Blueprint, but does anyone know of a way to use OnActorBeginOverlap without the level blueprint? To further organize my project and the use of many of these same objects, I wish to see if I can have the blueprint in the object itself.

Thank you!

You can add Overlap to the collision of the object you’re approaching, and add a collision box or sphere to the character themselves of a type it overlaps with.


To changing color as the character approaches, are you talking about a static mesh placed in a map or an Actor blueprint of some kind?

If you are using an actor blueprint with a mesh in it (which seems likely since you are having it respond) you can have it check where the player is and change color on its own.

A simple Actor blueprint with a mesh in it that changes color when the player approaches – and has a TextRedner above it showing how far away the player is.

Make a Reference to the Player Character (replace BP_Character with the Blueprint for the player character in your game).

Set a timer to keep checking the distance.

Here I have that timer setting the [Text] on theTextRender to show the distance from the player, and using the distance to create a color that is then applied to the Mesh using a Dynamic Material Instance (just a material with a Parameter named Color plugged into the Base Color).

At the end it calls another event to turn the TextRender to face the player.

Simple event to turn the text.


And you asked about the player walking into the object…