- Home /
can someone explain particle collision to me?
Hi guys Ive decided to use Particles for the weapons in my game (guns and stuff) when use colliders on the particle system i can see the particles hitting and bouncing of my player, is it possible to register this as a hit in the game and trigger damage?
Answer by OutOfRam · Sep 17, 2016 at 06:29 PM
Were I you, I would not use particles as a weapons projectiles. There are two ways traditionally that guns are made in any game engine or scripting language. The first is a raycast system, whichcalculates a line from your gun to where it hits and the second is a prefab system, where a physical object is instantiated and force is added to it. If the weapon you are trying to make is a flame thrower and these systems do not work for you a better method would be to have a trigger hitbox turned on while shooting at the end of your gun along with particles and have the hitbox do the damage
Answer by SorenaCoder · Sep 17, 2016 at 07:49 PM
Hi, It seems their not just colliders in particle systems, particle systems detect other objects using raycast, so it seems you can't do that.
but you can do a raycast seperately and do the damage and for displaying line of fire you can use particle systems, that's what i have done in my FPS game, and it's really works good on android platform
Answer by tanoshimi · Sep 17, 2016 at 08:05 PM
You certainly can... by implementing OnParticleCollision()
Your answer

Follow this Question
Related Questions
ParticleSystem performance optimization questions: Clear(), Stop(), SetActive(false) 0 Answers
How can I introduce a turning function for my player in this script? 1 Answer
How to get a Model to move and play an animation? 1 Answer
How to get multiple string values from override ToString()? 1 Answer