Hi, I'm working on a game where you can cast a spell that makes a trail of poison on the ground. The poison trail consists of shuriken particles systems from Unity 3.5. There are some horizontal bilboards in those systems and the problem is, the systems need to be able to travel uphill on a terrain. So the angle of the particles should change according to the hill angle, to keep them facing away from the terrain and preventing them to be just horizontal and go half through the terrain. When it comes to coding I have everything to make this work, I use raycasting to get the exact angle of the hill and the prefab rotates exactly the way I want it to.
Problem: when I rotate the prefab, it doesn't do much because it contains horizontal bilboards, that of course don't rotate because they are forced to be horizontal. Now I found out, by using a plane mesh and the rendermode Mesh for the particle system, I can rotate them as I want, but only in the editor. Once the system is emitting in the game, for some reason rotating the prefab doesn't effect the rotation of the planes anymore. UNLESS I set it to be local space. But then I have the problem the particles travel as 1 pack and don't stick to the ground, because you need them to be worldspace for this..
I think the solution lies in alternating between localSpace and worldSpace but, unlike normal particle emitters, the ParticleSystem class doesn't have a variable to set the simulation space? Does anyone know how to change the simulation space of a shuriken particle system in code?
asked Feb 23 '12 at 02:01 PM