Line Tracing to target and arcing projectile path
So, I'm in a little pitch here. I want to make my projectile travel in an arc from my character to the target hit by line trace. I've been doing all grenade tutorials and timelines I could find but nothing seems to be working for what I actually need which is something like this:
The closest I got to my goal is lerping the values of X and Y like (0 at 0, 0.5 at 0.5, 1 at 1) and lerping the values of Z like (0 at 0, 1 at 0.5, 0 at 1). My blueprint Part 1: Part 2: Sorry if my blueprints are a little bit of a mess the the moment
I'm a little bit lost because the animation starts playing only after projectile hits the target or it starts way above my character and then slowly descends to the desired location. Projectile also seems to be following my cursor which is not the intended behaviour. To give a better idea of what I'm attempting here is a youtube video: https://www.youtube.com/watch?time_continue=4&v=0HqHgjtNw4Q
All help is more than appreciated, thank you! :)
asked Apr 03 '18 at 01:18 PM in Blueprint Scripting
your methodology seems to be pretty solid from what i can tell. i just made a similar system which takes into account a difference in height which is posted below. the one i made works like what your looking for but i would have guessed that yours would work as well given the timeline curves are set right. for the method i employed i used two curves a 0-1-0 and a 0-2. since i wanted to take into account the height difference between the player and the enemy i had to lerp between 3 values so thats where the second curve came in paired with a select node. other than that its similar to what you have. do keep in mind though that the start and end points (the actor locations in this case) should be set to static values to prevent odd behavior such as exponential acceleration. also check to see if within your projectiles blueprint the hierarchy is affecting things, such as not having the wrong component set as root. depending on what the root is all sorts of odd behavior can occur.
as for your projectile following the cursor that should be a separate issue thats not part of whats shown here.
answered Apr 04 '18 at 03:24 PM
You may want to add Projectile Movement Component and use it's Homing functionality to guarantee missile hit on your target.
Let me know if you run into any problems.
answered Apr 04 '18 at 02:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here