Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.15
more ▼

asked May 09 '17 at 06:38 AM in Blueprint Scripting

avatar image

1 1 1 1

avatar image Benergy May 09 '17 at 06:53 AM

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.

avatar image ojcruz May 09 '17 at 08:25 AM

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.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question