The Perfect Arc

hellmonja27

Member
Reaction score
16
i've been looking for a tutorial i've heard about how to make the perfect arc. this is used mainly for tiny's toss. i've got a some demo maps with Toss on them but it's hard to understand other's code. i've been looking for this for quite a while here and at wc3sear.ch and haven't found it yet.

i'm just asking for directions if someone happened to have the link to this, or even just the mathematical formula on how to make the perfect arc. thanks...
 

lh2705

Just another Helper
Reaction score
111
I have a rough idea on this, i think the toss just changes the units height higher and moves them, after a while, the height decreases and returns back to normal. I don't think there is a formula, or maybe you could try a parabola function(I don't really know what it is but emjlr3's leap spell uses it and its good, the further you jump, the higher you go)
 

R@d14nc3

New Member
Reaction score
49
no, if the flying height was changed even in 0.01 sec it would be like moving an elevator :p
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
You have to set the flying height repeatedly to a value returned by either a sine (recommended cuz its E Z zors) or an upside-down quadratic formula where the input is the distance you are so far along the jump.
 

hellmonja27

Member
Reaction score
16
so it's like:

Event: for every .3 seconds
Action: set Flying Height to X

where X is equals to (a sine or quadratic formula here where the one input is "distance traveled")

so my problem now is the formula itself. sorry, i really suck in math...
 

Kershbob

New Member
Reaction score
30
X(sin(distance))

X is the max height; distance is usually dictated by "Integer A" if your making it simple.
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Well, to be uber specific:
A+Bsine(2piX/C)
A shouldn't exist in yours though because that's for vertical translation, and yours starts on ground level, so:
Bsine(2piX/C)
where B is the max jump height, X is the distance into jump, and C is double the jump length.
So C will have to be a variable.
 

Tom Jones

N/A
Reaction score
437
You don't need loops... Tiny's toss is one simple acion, and the thing that decides how fast it goes is the last data field.
Code:
Animation - Change (Triggering unit) flying height to *The height* at *How fast it goes to that height*
I think the value in dota is 7000-10000, and i know that emiljers toss replica is 10000, which looks great.
*edit*
Weee, i didn't read the tread. Well done!
 

hellmonja27

Member
Reaction score
16
thank you everyone. will try them out now... :D

-EDIT-
>C is double the jump length.
so C is like X*2?...
 

waaaks!

Zinctified
Reaction score
255
hey how about prisetest of the moon's leap in Dota it looks like a perfect arc....
does anyone knows how to make on simillar to her leap?
 

hellmonja27

Member
Reaction score
16
well, the thing about Leap is that the distance is already set. so they just have to calculate how long the trigger would wait before it starts adjusting it's flying height so it would touch ground again.

with Toss, the distance is variable, but all the same, the arc remains perfect. it's just a guess anyway...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top