playMaker

Author Topic: Jet flames based on movement/Velocity?  (Read 1218 times)

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Jet flames based on movement/Velocity?
« on: September 30, 2015, 02:06:55 PM »
Hi all,

Having a bit of a challenge getting jet flames (mesh plane object) to scale into view when the player moves. Currently using a prefab 'MobileSingleStickControl' which works well enough. So flames can't appear based on keystrokes but I guess should appear based on ship movement or joystick direction.

Game is a 2D shooter type. Player is a ship with guns facing right. I would like the jet flames to appear on the top, rear and bottom when the player moves down, right and up respectively. i.e. player moves down flames appear on the top.

I was originally hoping to read the direction of the ship and have the flames scale as per the paragraph above. Each flame objects has its own (empty) parent which is centered on the player object so by scaling the parent the flame should appear to the person playing to shoot in and out.

Am I going about this totally wrong? What is a better way?

The pics below - the FSM is attached to the player.

Still new at this. Any help would be most appreciated.

Thanks.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jet flames based on movement/Velocity?
« Reply #1 on: September 30, 2015, 03:37:01 PM »
Hi,
I think i would use the animator for this and use 2x get axis, 1 for horizontal and 1 for vertical and use set animator float
this way you can make some nice animated sprites

Here you can find a tutorial for 2d and animation,
look for 2D Sprite Based Platformer part 1 and 2