OnComponentBeginOverlap "Overlapped Component" and "Other Actor" have the same location?

I’m trying to get the distance between an actor and the location of a collider to update the intensity of a light. The light is supposed to get brighter as the actor gets closer, but as soon as the event fires it shoots straight up to full intensity. When debugging it, I discovered that the vector values for both of the pins was the same. Shouldn’t “Other Actor” give me a pointer to the actor which caused the event? I tried looking at the documents for OnComponentBeginOverlap, but it’s pretty unhelpful.

What do you mean with “collider”? Also, if it’s just about the distance between the actors, you could use OnActorBeginOverlap.

And you wrote “the vector values for both of the pins was the same”. Do you mean the pins “Other Actor” and “Other Comp”? If yes, then it is okay that both have the same location, because you probably collided with the root component of the other actor. “Other Comp” holds the reference of the component you collided with of the other actor, not the component you bound the event to.

My first thought is the same as Benergy. Are you sure you’re getting the actor’s location and not the collider twice? Also, I’m not sure if this approach will give you the effect you’re describing. Begin overlap will trigger once when you first come into contact, but will not repeat, so smooth changes in intensity would not work. You can use a line trace on tick and the getDistanceTo node to get the distance between the collider and the actor.

Here is a video on how to do this.