| 05-20-2009, 08:16 PM | #2 | |
Quote:
|
| 05-21-2009, 03:06 AM | #3 |
Create a function that gets the absolute time of the jump. This might require summation calculus, or at least a masochistic application of algebra. Once you have that in a temporary real variable, it's a simple matter of arithmetic from there. Now, keep in mind the "hit" part of the critical strike animation hits before the animation is done. |
| 05-21-2009, 08:56 AM | #4 | |
Quote:
I somehow doubt that. Theoretically, I do have the jump time: the jump distance divided by his speed on the x-axis. That's why I don't get why it doesn't work. |
| 05-21-2009, 09:26 AM | #5 |
I don't see why you should have a problem with this, it's entirely possible to give the jump a fixed duration, thus avoiding any sort of animation problems. |
| 05-21-2009, 10:20 AM | #6 |
This is true ofc. I had several possibilities for the jump, but I wanted to take the most realistic one. If the BM jumps 700 distance in 1.5 seconds and 300 d. in 1.5 seconds, it'll look weird. |
| 05-21-2009, 10:48 AM | #7 |
The easiest thing to do is to dynamically set the unit's animation timescale with each iteration, keeping it on track to hit the right point in the animation just as it reaches the target. The math for this isn't too complicated, you should probably be able to figure it out. The animation speed doesn't stay constant, but the difference is too subtle to notice, and it works even if your target is running toward or away from you during the jump. |
| 05-21-2009, 07:02 PM | #8 | |
Quote:
Okay, I got it. You, sir, are awesome :) +Rep |
| 05-21-2009, 07:56 PM | #9 |
It takes exactly 0.8 seconds for the sword to hit the ground in the animation I use 0.7625 for a time to do damage, it looks fine |
