Arrow Component that Controls Both Power and Rotation

Hi Everyone,

Currently I have a pawn (which is a ball) with an arrow component attached. Using the AddLocalRotation node, I can control the rotation like so:

However, for the life of me I cannot figure out how I would use this arrow to control the ball’s velocity or add force. Essentially, what I want is to control the length of this arrow (within limits of course) by clicking and dragging it, then launch the projectile at a speed which corresponds to the component’s length. For example, if the arrow was fully extended, the ball would be launched at the set maximum velocity. The functionality is similar to many mini golf games.

I’m new to Unreal, so perhaps there is a better way to go about this.

Thanks in advance,

It seems like you already have most of what you need to achieve this. If you use the arrow’s forward vector then you’ll have the direction. Since this is normalized then you just need to apply a speed value to acquire your velocity.

Choose the max length allowed and scale the speed based off of the total length of the arrow on a ratio of 0 - 1. 0 being no speed and 1 being max speed.

Thanks for the reply. I’ve been able to add velocity and scale the arrow separately, but I’m still struggling the with combination. I’ve attached the piece of my blueprint which controls the pawn rotation, perhaps you could suggest the nodes and variables needed to achieve what you talked about in your last sentence. I’d very much appreciate it :slight_smile: