- Home /
Shuriken particle system useWorldSpace?
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?
Thanks :)
I solved my specific problem with a workaround but I'd still like to know if it's possible at all to switch a shuriken particle system's simulation space between world and local space? (in code)
Answer by mighty_marcos · Mar 01, 2012 at 02:32 AM
Lock to Transform checkbox.
on = local space off = world space
Oops, missed the last line in your question's never $$anonymous$$d
Your answer
Follow this Question
Related Questions
Change colour of particles with C# 1 Answer
How can I scale Shuriken particle system? 2 Answers
Particle system (Shuriken) 4 Answers
how can I get particle.position out of shuriken system? 2 Answers
How to import particle emitter mesh without inner edges? 0 Answers