playMaker

Author Topic: Particle Collision  (Read 14220 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Particle Collision
« Reply #15 on: March 26, 2017, 06:48:38 AM »
It's very useful script, but to be honest, I don't think we need it anymore, since Playmaker has "On Particle Collision" now. It works very well. :)


Care to elaborate on how to use this? I can't seem to grab the normal or hit point of the particle against an object with just PM. I must be missing something.


Hi!
On the particle you want to collide with, did you enable "Send Collision Message" on the Collision? You also need to change the Collision Mode depend if you use 2D or 3D Collider. If you set up the collision FSM on the particle you want to collide with, you need Rigid Body on the particle.

The last thing, on the Collision Event, you need to choose "On Particle Collision." Maybe you already did this.

Tell me if it works or not. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Particle Collision
« Reply #16 on: March 26, 2017, 11:39:25 AM »
It's very useful script, but to be honest, I don't think we need it anymore, since Playmaker has "On Particle Collision" now. It works very well. :)


Care to elaborate on how to use this? I can't seem to grab the normal or hit point of the particle against an object with just PM. I must be missing something.


Hi!
On the particle you want to collide with, did you enable "Send Collision Message" on the Collision? You also need to change the Collision Mode depend if you use 2D or 3D Collider. If you set up the collision FSM on the particle you want to collide with, you need Rigid Body on the particle.

The last thing, on the Collision Event, you need to choose "On Particle Collision." Maybe you already did this.

Tell me if it works or not. :)

hi, well this much works but what action do I use to gather more data? The collision event only has the hit object and force, but I want the location point the particle is hitting... but everything I try after collision event isn't giving me any additional values so what would you use? Get collision info returns zeros, physics is working and the event is triggering though.
« Last Edit: March 26, 2017, 11:47:22 AM by Twood »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Particle Collision
« Reply #17 on: March 26, 2017, 01:19:20 PM »
Quote
hi, well this much works but what action do I use to gather more data? The collision event only has the hit object and force, but I want the location point the particle is hitting... but everything I try after collision event isn't giving me any additional values so what would you use? Get collision info returns zeros, physics is working and the event is triggering though.

Hi!
I'm not really sure how to do it, if it's possible. I tried to "Get Collision Info" when I collide with particles and store everything in variables. The only thing which was stored, was the player.

I tried to do the same with a normal Game Object, then it stored everything.
Maybe Jean Fabre can explain if it's possible. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Particle Collision
« Reply #18 on: March 26, 2017, 01:50:52 PM »
yes, I don't think all the data is passed through PM even though they added that new collision event stuff in PM. So forget that...

good news is mdotstrange's script works AWESOME and does what I need! Thank you mdotstrange.

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Particle Collision
« Reply #19 on: March 26, 2017, 03:39:24 PM »
Have you tried to use Get Event Info?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Particle Collision
« Reply #20 on: March 26, 2017, 05:31:17 PM »
Have you tried to use Get Event Info?

Yes, when I was trying that method. Only thing it would ever get is only what the game object was for collisions unless I missed something there. (It's quite annoying to experiment with to be honest as you start scouring the dozens and dozens of particle settings, rigidbody settings, etc looking for a problem, etc) so I'll stick with the script version. It's working fine!

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Particle Collision
« Reply #21 on: April 12, 2018, 01:37:08 AM »
I can't get this script to work. I am also trying to do this in 2d if that makes a difference(which it probably does). Also in visual studio when I took a look at the script it said a line was deprecated, but I'm not sure how to update it. Anyone available to take a look? I am ultimately trying to get the point of contact from the particle collisions to spawn something there.
Most Recent Published Games:
Juicy Theater - Android

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Particle Collision
« Reply #22 on: April 12, 2018, 02:51:20 AM »
What is deprecated, we'll just take a look at documentation and update it.
Available for Playmaker work

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Particle Collision
« Reply #23 on: April 12, 2018, 03:11:44 AM »
I did look at it but it says to change it to a list and I am not very familiar with lists. I tried changing it but the things i tried didn’t work.
Most Recent Published Games:
Juicy Theater - Android

serenefox

  • Full Member
  • ***
  • Posts: 135
    • Serenefox Games
Re: Particle Collision
« Reply #24 on: April 12, 2018, 03:26:45 AM »
Figures I would post that and then I get it to compile but I still can't get it to pass the event data. I will keep working with it though.

Edit*** And then after I posted this I got it to work with the new updated code, so never mind... ;D
« Last Edit: April 12, 2018, 03:34:10 AM by serenefox »
Most Recent Published Games:
Juicy Theater - Android

DennisJensen

  • Full Member
  • ***
  • Posts: 104
Re: Particle Collision
« Reply #25 on: June 21, 2018, 04:46:04 AM »
Just a note,

It only works if the hit object has a rigid body. I modified the script a bit so it works on all objects and added an FSM public variable where you put your FSM component into. If you have more than one FSM on the object this makes sense.
Game Designer, CEO, Artist
http://2ndStudio.com