x

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"

ActorBeginOverlap only triggering for one actor

First of all I should mention that Im a beginner, so any advice is appreciated!

I'm creating a simple Pong game and am implementing the ball (BP_Bola) collision with the wall (BP_Parede). The way I have it set up is by checking if the ball is overlaping the wall and then calling a function to apply the ball movement logic. The movement logic is working but I cant get the wall's ActorBeginOverlap event to trigger.

I had all the functionality for the ball collision on the ball blueprint, and everything was working well, but I decided to move each collision scenario to their respective BP, so if the ball hits the wall, the wall should take care of bouncing the ball off it, etc..

Only the ball's overlap event is triggering, not the wall's.

Below you can see each BP and the meshes properties.

Wall: Wall blueprint

Ball:

Ball blueprint

Product Version: UE 4.13
Tags:
1.png (306.8 kB)
2.png (333.8 kB)
more ▼

asked Oct 16 '16 at 12:54 AM in Blueprint Scripting

avatar image

dubonzi
1 2

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

1 answer: sort voted first

My guess is that you are not familiar with Casting.

You are using casting to access a function in a certain blueprint, but that is not why you would use casting.

When you use casting you are basically asking is the overlapping actor of type BP_Bola?

If the overlapping actor is not of that type then the cast will fail.

But you still need to access that function, therefor what you need to do is save that BP_Bola in a variable, and next time you can call that function from the variable directly. On event begin play, get all actor of class BP_Bola, get the element 0 (assuming you only have one BP_bola in your scene) and save it to a variable, and voila you can call the function with out using a cast.

more ▼

answered Oct 16 '16 at 06:00 AM

avatar image

Night Watcher
1.7k 44 12 71

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question