playMaker

Author Topic: Predict and draw missile route on screen  (Read 3511 times)

Megisto

  • Playmaker Newbie
  • *
  • Posts: 28
Predict and draw missile route on screen
« 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.?

Megisto

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Predict and draw missile route on screen
« Reply #1 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.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Predict and draw missile route on screen
« Reply #2 on: May 08, 2013, 03:18:59 PM »
I'm pretty interested in this as well...
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Predict and draw missile route on screen
« Reply #3 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Predict and draw missile route on screen
« Reply #4 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