HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Another Math problem

08-20-2009, 05:13 PM#1
Wizardum
okay, hmm... I've been trying to do something like the image (yes I'm really good at drawing in paint) but the missile doesn't go exactly like the trajectory, it follows the path height, instead of continuing straight forward, and also when it hits the ground it should stop, but no, it just continues.

So I ask if there is a formula to continuously calculate the new missile height correctly to avoid this annoying issues. There is a Jump system on hive which does something like this, but when I tried to use the formula to calculate the height, it remained screwed.
08-20-2009, 05:22 PM#2
chobibo
Are you already using the LocationZ+FlyHeight method? Maybe you could post the code your using.
08-20-2009, 05:39 PM#3
Wizardum
yap I tried.
here it is:
Collapse JASS:
call MoveLocation( d.loc, d.cx, d.cy )
set d.cz = ParabolicMovement( d.mh, d.md, d.cd ) - GetLocationZ( d.loc ) + d.sz
call SetUnitFlyHeight( d.m, d.cz, 0.00 )
08-20-2009, 06:01 PM#4
snowtiger
Did you add and remove the crow form ability?
08-20-2009, 07:09 PM#5
Wizardum
yap I did. It flys but still follows the terrain height like a normal flying unit
08-20-2009, 07:48 PM#6
ToukoAozaki
There must be a field regarding height sampling range...
08-20-2009, 08:49 PM#7
Wizardum
a better explanation, could actually help please :)
08-20-2009, 09:12 PM#8
Pyrogasm
The unit can't have flying-type movement in the OE; it must be added through the Crow Form trick.
08-20-2009, 09:52 PM#9
Wizardum
but I already do that, I told that before
08-20-2009, 09:57 PM#10
Pyrogasm
Eh, I was just saying to make sure it has 'ground' movement type in the OE.
08-20-2009, 10:09 PM#11
Anitarf
Actually, "hover" movement type is the best, since ground gets screwy under water because the "ground" unit's flying height is measured from the ground while GetLocationZ measures from the water surface.
08-22-2009, 10:53 PM#12
Wizardum
nope, that doesn't solve the problem either.

I remade the system, it's incomplete but should work okay, but now the missile doesn't even move, it creates and stops, right after. It stops because supposedly the x and y aren't walkable.

Anyway here is the system:

Expand Jump System: