How do I make a object move towards the player in a straight line without following him?

I’ve a enemy that throws a fireball at my player. I’m using a timeline and SetActorLocation to do this, but the fireball follows my player, this way it’s impossible to evade it. I wanna be able to escape from it, so I need the fireball to go towards my player in a straight line and also be able to set the velocity of the ball. How do I accomplish this?


“Boneco BP” is the player. And in SetActorLocation, target is the fireball

Put the player location in a variable before you start the timeline :slight_smile:

Yes I did that. But the problem now is that the fireball doesn’t have a constant speed. It will move a distance of 5 or 50 in the same amount of time.

You need to put both locations in variables before you start the timeline. Start point and end point.

You’re having problems, because you’re re-sampling the location during the timeline.

2 Likes