Download

Automatic Ball Retrieval method

I know there is often not “one right way” to solve something in ue4, but i have spent several days trying all sorts of different strategies and i think i could use some advice from someone with experience. I have a ball which is controlled by physics. At the moment the ball is a character. When a button is pressed, physics turns off, and the ball flies to the player and attaches to a point in front of the player, then when the button is released, physics reactivates.

I am currently accomplishing this with a “Simple Move To Actor” node inside the ball character blueprint (on the event tick because that’s all that seemed to work). This method has a lot of jitter (character moves, and ball follows very quickly, but noticeably behind). I have tried using “move to location or actor” but that one seemed to completely pause the ball if i moved my character while the ball was in flight – and then the ball would zoom to catch up.

I have played with both find path synchronously nodes (not sure i used them right, I have had a very hard time finding documentation), and also making my own thing via set location.

I guess I just wonder what people thing the best approach is that would be the simplest to enable so that i don’t waste much more time with what i am sure is a simple problem.

Thanks!

If the Ball is just following the Player? Why not just use a simple Lerp instead? If there is no real need for the Ball to actually find an complex path then this approach would be more optimal.

Well i was hoping that it would avoid obstacles (just static meshes) that are in the scene, rather than just flying through them. For now i am just using the AI Move to node, and attaching it to the component when the move completes. The move fails like 30% of the time, which i can’t figure out, but that’s better than nothing for now :slight_smile: