Fulla
Evil Overlord
- Reaction score
- 31
I'm working on a projectile spell that moves in an Arc up then down, like this:
Im hoping to make the projectile's angle/facing adjust with the Arc.
Currently this is what it looks like/happens (pretty ugly):
What I'd hope it will look like eventually:
In iNfraNe's Particle System, it was done with vectors like this:
Note the missile is a Dummmy model that has multiple animations for setting its angle/facing.
I had a little try, but failed:
thx for any help
Im hoping to make the projectile's angle/facing adjust with the Arc.
Currently this is what it looks like/happens (pretty ugly):
What I'd hope it will look like eventually:
In iNfraNe's Particle System, it was done with vectors like this:
JASS:
set j = R2I(Atan2BJ(udg_vectorZ[v], SquareRoot(udg_vectorX[v]*udg_vectorX[v]+udg_vectorY[v]*udg_vectorY[v]))+0.5)+90
call SetUnitAnimationByIndex(u, j)
Note the missile is a Dummmy model that has multiple animations for setting its angle/facing.
- What mathmatical figures are needed to adjust it properly?
Is Speed, Height, Angle, X, Y enough? - What formula can correctly set the animation / facing?
I had a little try, but failed:
JASS:
set aoa = R2I(Atan2BJ(GetUnitZ(dat.missile), SquareRoot(x * x + y * y)) + 0.5) + 90
call SetUnitAnimationByIndex(dat.missile, aoa)
thx for any help