Hey all I’m trying to make something like a League of Legends Skillshot (Upon clicking a button an arrow appears and if you hold the button you can control the rotation and direction of the skillshot.) I want to make it so that when the player presses the right mouse button down it creates an arrow around them that gets longer as it’s held down. I also want it to be able to rotate around my character but I’m having trouble getting the rotation information right. Currently, I have a game object looking at the rotation of the camera that is behind my character and my theory is that I just need to flip that look at rotation value to get the correct rotation data. Does anyone here have any suggestions of how I can do this or a better idea of how to implement this kind of mechanic in Unreal Blueprint?
I could use some help in recreating a League of Legends Skillshot (The Arrow effect that shows where the shot will end up) Any ideas?
There are many ways to do this, here’s one:
If you want to account for elevation, use
Get Hit Under Cursor by Channel / Object instead.
The arrow is attached to the character here but its rotation is set to Absolute, so the character’s rotation does not mess it up. You could keep it relative if need but the it needs translation.
If you wanted a lobbed projectile, I’d look into Projectile Component + Predict Projectile Path combo.
Wow thank you so much Everynone! This is incredible! I like your solution much better than mine. I like the arrow to the knee reference to haha. The solution I found, was changing the relative rotation of the object via getting the Mouse X position but I didn’t know you could turn the Mouse Position into world position coordinates. That’s so cool! That seems to make the rotation easier to calculate and control since it is based off of the mouse position in its entirety rather than just one coordinate. Really new with rotation blueprint logic in general so thank you so much for your help!