Move a different actor on overlap

Hi guys, I’m new to unreal engine and am trying to make a basic goal scoring system (like rocket league) but I can’t seem to understand how to cause the ball’s location to reset after it collides with a box collision, I would also like to try and reset the position of my player object also. Any help or guidance would be greatly appreciated.

Hey @Chip_14, welcome! This isn’t hard to do, all you need is a reference to your player and the ball and you will easily be able to move them. First let’s start with the ball since it will be the easiest. Once it collides with the box collision, use the box collision’s “on actor begin overlap” to drag out from the “overlapped actor” pin, and search for the nodes like “Set Actor Location”. This will allow you to move the actor to any location you want instantly. If you want to do more like change something specific on the ball or one of its variables you will need to first cast to your Ball_BP from the overlapped actor pin then you can use the output pin from the cast node to modify variables within the Ball_BP. As for the player reset, this can also be done in sequence right after you reset the ball’s location simply by right clicking in the event graph and searching for “get player character/pawn”. From there you can use the output pin of that node to cast to your specific player character type and then you will be able to use the output pin of the cast node to set your player location the same way you did the ball. If you need more explanation or prefer a visual format check out the following Beginner Tutorial Series. The first video goes over casting, #25 goes over references (those will be most helpful to you). Below that I also placed a link to a video explaining overlap events as well.

Beginner Series:

Overlaps:

Example of the overlap

Thank you for the reply, I’ve managed to solve it using a slightly altered version of this. Thank you for helping me out :slight_smile:

No problem glad it was helpful.