playMaker

Author Topic: Fire particles damage the player  (Read 1913 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Fire particles damage the player
« on: February 26, 2014, 02:02:23 AM »
Hi!
How can I damage the player with particles? For example if I have a big explosion, and I want this explosion to damage or kill the player. I tried to use a trigger, but it's not very good, because the size of the particles can be different.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Fire particles damage the player
« Reply #1 on: February 26, 2014, 09:32:15 AM »
Generally you want to make this as cheap as possible and collision detection on individual particles could get expensive. Have you looked at this?

If your explosion is spherical then you can just use a sphere trigger that grows with it. If it has projectiles then you could setup that it spawns chunks of prefab objects that contain smaller sphere or box triggers. The Detonator Framework might help you do that.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Fire particles damage the player
« Reply #2 on: February 27, 2014, 05:27:16 PM »
Thank you!
Shuriken looks great. :)

But if the explosion is pherical,  how can I use a sphere that grows with the explosion?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no