playMaker

Author Topic: Physics explosions and layers help  (Read 2270 times)

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
    • View Profile
Physics explosions and layers help
« on: May 04, 2013, 11:42:23 PM »
Hey,

I'm using 1.5.7 play maker on unity 4.1.  on touch I have 2 explosions going in the same state. 

Explosion 1
Force > 1
Layer > Player

I then have a game object in the scene on layer Player

Explosion 2
Force > -1
Layer > Object

I then have a game object in the scene on layer Object

When I do the touch, both Explosion 1 and Explosion 2 are affecting all game object at the same time and I can't figure out what I've done wrong.

Any help would be wonderful.  Thank you.

xhidnoda

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Re: Physics explosions and layers help
« Reply #1 on: May 05, 2013, 08:50:49 AM »
what action you use?
Note: if you use touch event....this affect all game object, not matter what you touch in the screen.
Maybe you try whit touch object event.
« Last Edit: May 05, 2013, 08:54:13 AM by xhidnoda »

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
    • View Profile
Re: Physics explosions and layers help
« Reply #2 on: May 06, 2013, 05:48:55 AM »
Hey,

I can't use a touch object event because the mechanic doesn't work that way.  You touch an area on the screen, it translates the point to world space in the game and creates a force.

Perhaps I should birth a force FSM, which I'll try now.

The problem isn't really the call of the touch (I would have thought), it really is that I've asked an explosion to affect a game object on one layer, while a 2nd explosion should affect an object on another layer.

The 2 explosions are affecting all the object no mater what layer I put them on.

 :(

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Physics explosions and layers help
« Reply #3 on: May 06, 2013, 06:08:59 AM »
There is a circular gravity script on the asset store for 5 bucks that may be useful. You can use a tag filter to isolate the objects you want to effect and just create a negative gravity blob where you touch.

Same as creating an explosion, but you have a tag filter.

It would probably be fairly straightforward to just modify the explosion force action to filter a layer though.

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
    • View Profile
Re: Physics explosions and layers help
« Reply #4 on: May 06, 2013, 07:49:34 PM »
Thanks for that.  The thing is it has layer filtering in the play maker action.  So I'm at a loss as to why it is ignoring it.  I've put this up on bugs as no mater how I approach this it does the same thing.

I'll look into this plug when I get home.  Thanks man.

Hans.