ProjectileMovement Component: Velocity
Hi! So I'm trying to make a bow and arrow system where I spawn in an arrow and depending on how long the player holds the left mouse button it changes the velocity of the arrow.
When I tested the arrow I set the z velocity to something like 2000 press play and the arrow flies up in the air. If I rotate the arrow sideways, press play, the arrow flies in the direction it's pointing, great! But when I place the arrow into a level with z velocity = 0, increment a float and do a branch to check if it's at 2000 or not, and if it is I set the z velocity to my new float, the arrow always goes up(along the z axis), it doesn't follow the direction of my arrow, why is that? :P
Any help would be greatly appreciated!
asked May 05 '18 at 12:31 PM in Blueprint Scripting
Fixed it, changed the "Set Velocity" to "Set Velocity in Local Space" and that worked. I figured it had something to do with the rotation. Am I correct in assuming that when the arrow component has it's velocity set before I press play, the rotation is "already calculated"?
Anyways, hope this helps if someone else has the same problem :)
answered May 05 '18 at 01:02 PM
Another solution would be to set the "Initial Speed" of the projectile movement instead of what you did. Set the rotation to the player control rotation and all will be fine. Don't set directional velocity (x, y and z)
Hope that helps :)
answered May 06 '18 at 06:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here