|
Does anyone have a good way to prevent particles from bouncing when they collide? I'm trying to make custom collision-handling code - for example, to use particles for armor-piercing bullets, so they should hit the target, go through and hit stuff behind it. The problem is that the particles always bounce off, even when the target is set up as a trigger. Adjusting the Bounce to -1 does nothing. Adjusting it to 0 just makes the bullet disappear.
(comments are locked)
|
|
you should set bounce to 0 but when you do this particle will continue collision with the object that you want to go inside so it will loose energy and die. you should make energy loss value a verry small one or even 0 to prevent them to be killed. Thanks, but I tried using low values or 0 for energy loss, and the particle still disappears. The minimum kill velocity is also set to 0 (I tried -1 but that didn't work either). My current settings are: bounce factor 0, energy loss 0, min kill velocity 0.
Feb 17 '10 at 05:55 AM
N N
Also, I set up my script to log particle collisions, and when bounce and energy loss are set to 0 then it only logs 1 collision for each particle, not multiple (continued) collisions.
Feb 17 '10 at 06:01 AM
N N
i have no experience using them. it was my guess. sorry if it was not correct. i'll delete the incorrect answer. should i delete it? it's not useful i think.
Feb 20 '10 at 04:40 AM
Ashkan_gc
Nah, I think it's fine. If someone reads this, they'll benefit from knowing that people tried that solution and it didn't work - so it's probably best to leave it visible.
Mar 16 '10 at 03:38 PM
N N
(comments are locked)
|
|
I'd suggest a combination of ray casting for hit detection and particles (without any form of collider) as the visual effect. You don't always have to do things the 'natural logic' way in gaming. The other technique would be to use prefab bullets and instantiate and add forces to them as if they were like a particle system. The behaviours and scripts would then allow you to do what you wish with the bullets. Particles are a visual effect primarily, not necessarily the right tool for the job at hand (in your case). Thanks. In the end my particles were slow enough that I could use a simple position/distance check. Not 100% accurate, of course, but close enough, and runs a lot faster than a raycast.
Mar 16 '10 at 03:39 PM
N N
(comments are locked)
|
