playMaker

Author Topic: World Particle Collider Support?  (Read 4296 times)

CommanderPete

  • Playmaker Newbie
  • *
  • Posts: 17
World Particle Collider Support?
« on: November 09, 2011, 07:02:35 AM »
Hi there.

I am trying to get a particle stream to cause damage to an object. As the world particle collider is not a rigidbody, I cannot see a way to check for collisons in Playmaker. Any suggestions or Playmaker Actions known to anyone that might solve that problem?

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: World Particle Collider Support?
« Reply #1 on: November 09, 2011, 08:02:02 AM »
Hi,

 check this:

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnParticleCollision.html

If that works for you, then what you need is to use the playmaker api to send a event ( either global or to a specific fsm). If you know how to do that then this is your missing link.

 If you need help to implement that api call. Let me know and I'll do a working example.

Also, maybe this can be implemented within playmaker as a standard System Event. Alex?

Bye,

 Jean

CommanderPete

  • Playmaker Newbie
  • *
  • Posts: 17
Re: World Particle Collider Support?
« Reply #2 on: November 09, 2011, 08:08:46 AM »
Hey Jean,

yeah I know how to do it via JavaScript. I had a working version in my last project. Implementing that, as the collison triggers some different functions relying to variables of the objects involved (particle effect tag, damage per particle hit variables, etc.) ), is a hassle that I was really hoping to avoid  ;D

Thanks anyway!
« Last Edit: November 09, 2011, 08:13:41 AM by CommanderPete »

CommanderPete

  • Playmaker Newbie
  • *
  • Posts: 17
Re: World Particle Collider Support?
« Reply #3 on: November 09, 2011, 06:10:20 PM »
Well, yeah, it is as expected. Using the old script means restructuring the most FSMs of all other objects involved and it is not such a nice and smooth solution anymore *sigh*. Has anyone ever solved that problem before? Keeping the rest of the FSM structure as is would really save my day :)

Thanks in advance!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: World Particle Collider Support?
« Reply #4 on: November 10, 2011, 12:18:00 AM »
Hi,

 Pm me with a sample if you can, I'll have a look over the week end. I am sure it's possible to insert a script that will bridge the collision detection with your fsm, it could mean building a custom action as well, but I am pretty sure you don't need to redo everything. I do that all the time on a project where I have a greta mix of existing scripts and fsm that are bridges together in various ways.

 Bye,

 Jean