playMaker

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

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
Physics explosions and layers help
« on: May 05, 2013, 02:42:23 AM »
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
Re: Physics explosions and layers help
« Reply #1 on: May 05, 2013, 11: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, 11:54:13 AM by xhidnoda »

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Physics explosions and layers help
« Reply #2 on: May 06, 2013, 08: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: 2511
  • Mender of the past
    • Cleverous
Re: Physics explosions and layers help
« Reply #3 on: May 06, 2013, 09: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

hunz

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Physics explosions and layers help
« Reply #4 on: May 06, 2013, 10: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.