Comments and answers for "Parabolic Movement Equation Problem?"
http://answers.unity.com/questions/737808/parabolic-movement-equation-problem.html
The latest comments and answers for the question "Parabolic Movement Equation Problem?"Comment by Omberone on Omberone's answer
http://answers.unity.com/comments/738183/view.html
Ah, I see. Well you could store the GameObject reference to your target and every update change the position on your projectile along your timeline.Mon, 30 Jun 2014 19:06:07 GMTOmberoneComment by MDarkwing on MDarkwing's answer
http://answers.unity.com/comments/738100/view.html
Well I've seen them, but they are physics based solutions, and I need hard coding solution like the top 2 equations. Not to be mislead, both equations work, I get parabolas in both cases, they are just "positioned" wrong, I need to see how can I get around that.Mon, 30 Jun 2014 15:38:19 GMTMDarkwingComment by Klarax on Klarax's answer
http://answers.unity.com/comments/738094/view.html
maybe you have seen these, but any help?
http://answers.unity3d.com/questions/377334/how-to-move-object-parabolic-projectile-path.htmlMon, 30 Jun 2014 15:31:43 GMTKlaraxComment by MDarkwing on MDarkwing's answer
http://answers.unity.com/comments/738093/view.html
Yeah I apologize, english is not my native language so I tend to be incomprehensible sometimes.
Yeah I know I can calcualte x and z at any given time problem is when if parabola is in XY coordinate system, what if x is changing over time which represents the unit moving, thats my main problem. My solution is to make it calcualte height based on the start distance then if target is not reached it just travels at that last height. Didn't test this knew formula I am currently busy with something else, as soon as I check it I'll post answer. Thanks anywayMon, 30 Jun 2014 15:28:45 GMTMDarkwingComment by Omberone on Omberone's answer
http://answers.unity.com/comments/738079/view.html
Could you perhaps explain what it is you mean by "dynamically calculate the height"? You should be able to get the x,z coordinate from a target at any point in time. Do you mean that you want to do a movement prediction?Mon, 30 Jun 2014 15:08:05 GMTOmberoneComment by MDarkwing on MDarkwing's answer
http://answers.unity.com/comments/738039/view.html
Thank you for answer Omberone.
Problem with my parabola is following:
I don't have fixed distance, just starting distance since when unit attack the projectile is throwed and it should follow the target aka its path is dynamically changed based on targeted unit. I also don't have the predefined time at which projectile should reach target, only projectiles speed (aka distance traveled per time interval). There are two problems I see already and thats following: somehow my parabola is caluclated on hypotenuse of a triangle which is y0 y1 O (where O being the vertex bellow y0). I did in calculation drop the y0=0 and then got the distance so i get the distance between origin points not the absolute distance between mass centres of object (them being y0 and y1).
Another problem is that parabola keeps descending aka since i pass fixed distance when it reaches zero of function and target is still not reached it continues to go bellow the ground. I have fixed this problem with simple if statment condition.
I've found another formula using the angle at which you shoot projectile so I'll try using it and see what happens, but by now i get it that for full effect i need some kind of formula that dynamically calculates the height of parabola while the target moves.
Anyway thanks again, ill update if i find out something.Mon, 30 Jun 2014 14:05:30 GMTMDarkwingAnswer by Omberone
http://answers.unity.com/answers/737856/view.html
Have you had a look at `http://en.wikipedia.org/wiki/Trajectory_of_a_projectile` ?
You need either
- a fixed time it will take for it to hit the ground, or
- an initial angle of attack of the projectile, or
- a fixed muzzle velocity
to be able to calculate the parabola accurately. As you say there are two different (four actually, but we won't bother with the two going below the ground) solutions to the equation, one that takes less time, and one that takes the longer time - with a higher arc. You seem like you know your way around math, so that wiki article should come in handy =)
Should you find it difficult to implement it, come back here and let us know.Mon, 30 Jun 2014 10:24:19 GMTOmberone