playMaker

Author Topic: Shoot in direction  (Read 2661 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Shoot in direction
« on: March 03, 2014, 03:43:54 PM »
Hi!

How can I make the player shoot in the direction it's facing?
For example, when the player is facing right, the bullet will shoot to the right.
And left, the player will shoot to the left.

I have a bullet prefab where I have the actions Add Force and Collision Event, so the bullet destroy it self when it hit something.

On the player, I have in state 1, Get Key Down. State 2, I have Create Object.
But it's only shooting to the right, because I have add the force value (800) to the bullet on the X-axis. So what action is still missing?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Shoot in direction
« Reply #1 on: March 04, 2014, 03:12:29 AM »
Hi,

 you have to invert the translation manually.

I am working on the Unity 2d sample and currently porting it to PlayMaker 100%, and it features exactly this case.

bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Shoot in direction
« Reply #2 on: March 06, 2014, 12:14:04 PM »
How can I do that manually?
I also found another way to do it, but it's not working very well. Maybe it's working 70 %.

When will you be finished with this 2D samples then?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Shoot in direction
« Reply #3 on: March 06, 2014, 07:41:59 PM »
hi....for me the all action of playmaker 2D is work in 90% (can make a flappy bird for example in 2D)
IN the meantime i use 3D physics with 2D toolkit, for now is working. :)