Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Megisto on May 03, 2013, 05:49:05 AM

Title: Predict and draw missile route on screen
Post by: Megisto on May 03, 2013, 05:49:05 AM
Hi, can u help me with this? (Please see attachment)

In my game there is a missile on a rocket launcher. I must give a missile an appropriate rotation to hit a target on the screen that can spawn wherever.

I don't want to use the "look at" action, as i must know the exact arc everytime, because i must draw a reference route on screen before the missile is launched (like angry bird).

Hope i make myself clear :)

By the way, how can i draw this route using, say, trials, prefab dot-shaped, etc.?
Title: Re: Predict and draw missile route on screen
Post by: Megisto on May 03, 2013, 09:12:48 AM
Another solution would be to define an arc trajectory and makes the missile always look forward along this trajectory. But i don't know how to achieve this too.
Title: Re: Predict and draw missile route on screen
Post by: sebaslive on May 08, 2013, 03:18:59 PM
I'm pretty interested in this as well...
Title: Re: Predict and draw missile route on screen
Post by: PolyMad on May 09, 2013, 01:30:58 AM
I would make a prefab with an arc mesh ready.

Then, I would scale it accordingly.
In example, with more power, scale it uniformly.
Lowering the angle would squash it on the vertical axis and enlarge the horizontal axis.
Etc.

Sure it's not ballistically accurate, but if we are talking about an angry birds game... ;D
Title: Re: Predict and draw missile route on screen
Post by: jeanfabre on May 09, 2013, 02:14:54 AM
Hi,

 ITween to the rescue. iTween lets you create path to animate objects ( and follow it).

http://hutonggames.com/playmakerforum/index.php?topic=1699.0

bye,

 Jean