Alternatively, Normalise
your subtraction vector and then multiply it by a float; but why bother - Get Unit Direction
is cleaner.
You do not need to use the At Location
variant of the Add Impulse
node here. That’d be needed for additional simulation characteristic where the location of the kick on the ball’s surface matters.
Another tip: immediately stop scripting in the Level Blueprint and move you script where it belongs:
- input goes into the player controller / pawns
- ball behaviour goes in the ball actor
Or you will need to rewrite the whole thing very soon…