- Home /
GameObject block particles?! help
Is it possible to make my particles not been able to pass through gameobjects?
Answer by dreadofmondays · Sep 11, 2012 at 07:13 PM
The gameobjects need to have some sort of collider, for the particles to collide with. You also need to add a World Particle Collider to the particle system and set up the variables in there.
That only applies to the Legacy Particle System. The new one in Shuriken can't do it that way.
Answer by Screenhog · Sep 11, 2012 at 05:52 PM
Sort of. There are two solutions.
With the Shuriken particle system, you can only make particles collide on a flat plane. This will be changing when Unity 4 is launched.
With the legacy particle system, you can make particles collide with actual colliders. However, the legacy particle system is limited in other ways, and there's no way of converting a Shuriken system to the legacy system... you'd have to build it from scratch.
Answer by Metalbreath · Sep 12, 2012 at 09:52 PM
what if i combine the length of particle with a Raycast? for example extend as a raycast and stop at the point where it touches a gameObject? Would that work?
Are you only creating a single particle with your particle system? And is the particle travelling in a straight line? If so, then yeah, something like that could work.
Answer by Metalbreath · Sep 13, 2012 at 09:27 AM
well it shoots 1 at a time. i managed to make it stop when it hits the Plane, but still not interacting with gameObjects. even with raycast :/ I guess the way i use the RaycastHit script is wrong.
Im new on Scripting. Could you show me in simple script how i could make that work? (if this is possible)
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
In-World Placement Help 1 Answer
c# play particle effect on key press? 1 Answer
c# destroy gameobject on 0 hp 2 Answers
Destroy Gameobject once 0 health 2 Answers