• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help about parabola projectile

Status
Not open for further replies.
Level 9
Joined
Dec 12, 2007
Messages
489
Hello, I would like to state the problem first.


Before the rollback in Spells section, there was 2 spell whom I forgot who created it which was in the Spells database, that now is lost and I can't find it anywhere.
Both spells are made in JASS as I remember those spells within my time of learning JASS

1st spell is a spell which launches several projectiles which moves in parabolic to target point. movement is shown with this diagram.
The projectile in the spell testmap is made with Breath of Frost model.

Side View
attachment.php


From first person view
attachment.php


2nd spell is a spell which launches several projectiles which moves in parabolic or circular movement too but in XY plane. I remember it has a homing feature that has a miss probability if target moves from initial position.

I can't describe how 2nd spell move in diagram because it has some random starting angle.
I remember the 2nd spell is made by Felfox as I once imported it in my map and write in the credits section. but that map of mine is protected and the unprotected version is lost in my old PC.

this is the link of the map, its an old map from 1.18 version. so it might need version switcher to view. the 2nd spell is the Shadow Missile from Shadowless Hero.
http://www.hiveworkshop.com/forums/...4d62f17e85d49507bcadcda94&dateline=1354694712



I would like to ask if anyone has a copy of the spell testmap or know any link regarding the 1st spell and 2nd spell.
or can help me with the calculation of 3D parabola for the projectile.
 

Attachments

  • view1.jpg
    view1.jpg
    16.1 KB · Views: 279
  • view2.jpg
    view2.jpg
    14.3 KB · Views: 303
Level 12
Joined
Oct 16, 2010
Messages
680
x1 = start point x coord
y1 = start point y coord
a = end point x coord
b = end point y coord
A = a - x1 (max distance vector's x coord )
B = b - x2 (max distance vector's y coord )
x2 = current position x coord
y2 = current position y coord
X = x2 - x1 (traveled vector's x coord )
Y = y2 - y1 (traveled vector's y coord )

maxD = total distance --> squareroot( A2 + B2 )

travD = traveled distance --> squareroot ( X2 + Y2 )

maxH = maximum height "maximum possible Z value" (defined by you)

calculation of Z

Z = -(maxH * (travD-(maxD/2))2 / (maxD/2)2 ) + maxH

this is how you calculate the parabola while max Z value can be set.

same on the XY arcing

XY arcing = -(maxArc * (travD-(maxD/2))2 / (maxD/2)2 ) + maxArc

if XY arcing is 23 for example
define a unit vector with A,B or X,Y

unit vector ( A/maxD ; B/maxD )

make the normal vector of it nv( B/maxD ; -A/maxD ) or nv( -B/maxD ; A/maxD )

make the arc vector av( 23*B/maxD ; -23 * A/maxD )

Modify the projectile's current X and Y with the arc vector's coordinates
 
Level 9
Joined
Dec 12, 2007
Messages
489
thanks for the response, Ofel.
though I would prefer coordinate calculation approach than location,
I think I can deduce the logic and calculation step from that,

thanks Lender,
I will try to understand each part in your post first.

I still hope for other answer, especially from those who have the old spell testmap.
 
Status
Not open for further replies.
Top