- Joined
- Sep 5, 2007
- Messages
- 358
Hello!
I'm currently working on a spell that requires missiles to behave a bit differently than usual.
Normally, when a missile is launched at a target position, the angle is calculated and set towards the target position and then we only need to apply the velocity to the missile's position.
In this case I want something a little bit different.
See when you have a missile that is targeting a unit, and that unit is moving? The missile moves and follows the target unit until colliding with it.
I'm looking for a similar behavior but for target points.
Basically the effect I'm looking to achieve is when a missile is launched towards a direction but slowly rotates to the target point, making a sort of parabola trajectory.
I sketched an image example of the effect I'm trying to do:
(Yap, awesome drawing )
Math is my weakest point, as you might have guessed already.
Now, how can I achieve this? The solution is probably simpler than I'm 'picturing' it.
I've already tried a few ugly methods and I only got totally weird trajectories.
Any sample Jass code or simply pseudo-code accompained with explanation would help greatly!
Thanks.
I'm currently working on a spell that requires missiles to behave a bit differently than usual.
Normally, when a missile is launched at a target position, the angle is calculated and set towards the target position and then we only need to apply the velocity to the missile's position.
In this case I want something a little bit different.
See when you have a missile that is targeting a unit, and that unit is moving? The missile moves and follows the target unit until colliding with it.
I'm looking for a similar behavior but for target points.
Basically the effect I'm looking to achieve is when a missile is launched towards a direction but slowly rotates to the target point, making a sort of parabola trajectory.
I sketched an image example of the effect I'm trying to do:
(Yap, awesome drawing )
Math is my weakest point, as you might have guessed already.
Now, how can I achieve this? The solution is probably simpler than I'm 'picturing' it.
I've already tried a few ugly methods and I only got totally weird trajectories.
Any sample Jass code or simply pseudo-code accompained with explanation would help greatly!
Thanks.