- Home /
Particle following Emitter Problem
Hello there guys, I have a problem, I made a simple Candle particle system but when I move the emitter:
I just want it to move like a normal candle,you know just move a little for the air resistance. If someone know the solution please explain me how to do it or if you want more information :)
Problem Number 2:
I've attached the Camera an image effect, Depth of Field,so the distant background is blurred. So when the flame faces the blurred background... :
I want it to be just a Simple Flame like when it's infront of an unblurred background :)
Any help would be vary appreciated :) Thank you!
Answer by ScroodgeM · Jul 28, 2012 at 06:23 PM
answer 1
change 'Emitter velocity scale' to 0.5 - 1 to apply emitter's move speed to particlesanswer 2
'depth of field' effect is based on distance from camera to object. that distance is taken from z-buffer (also known as camera's depth texture). transparent objects (and particles too) doesn't write to z-buffer it's distancethat's why flame is blurred. all you need is to draw flame AFTER applying blur effect. this can be achieved using second camera for flame only and render it after main camera.
also you can draw flame with z-write enabled, but this can make some strange effects at flame edges.
answer 3 (bonus)
demo: http://zammyart.com/UA/SmallFire/WebPlayer.html sources: http://zammyart.com/UA/SmallFire/smallfire.unitypackageanswer 4 (extra bonus)
switch to 'simulate in world space' to off, attach this to emitter, and try to move in game mode.using UnityEngine; using System.Collections;
public class AirResistance : MonoBehaviour { public Vector3 ConstantSpeed = Vector3.up; public float EmitterSpeedAffect = 1f;
ParticleEmitter particleEmitter;
Vector3 lastPosition;
void Start() { particleEmitter = GetComponent<ParticleEmitter>(); }
void Update()
{
Vector3 newPosition = transform.position;
particleEmitter.localVelocity = ConstantSpeed - (newPosition - lastPosition) * EmitterSpeedAffect / Time.deltaTime;
lastPosition = newPosition;
}
}
Hello,thanks for your answer,I fixed the blurred flame but I think you didn't get what's my problem for the 1st one. I didn't change the velocity to have that kind of flame as Picture 1 shows, that's a trail thingy it leaves when I move the candle. I think you get what I mean,It's should move only a bit when I move the flame,like a real flame,but ins$$anonymous$$d when I move the flame (move the emitter) it leaves on hell of a particles after it following the emitter.
i think i understand your question. world speed exactly do what you want, after emitter is moved all already emitted particles are not moved.
PS i can't load picture 1 from question.
Hello there,thank you for your time, but I don't seem to have a "World Speed" setting. Here is the Picture from Question one. http://i50.tinypic.com/ern78k.png And now see that I don't have the World Speed setting: http://screensnapr.com/v/o3Yddk.jpg Thanks for your time.
Hello there,unfortunatelly it doesn't help,It doesn't change the trail that my emitter leaves...Are you sure you get what I need? I coul'd show you the problem online on Skype,thanks in advance.
Answer by Akill · Jul 31, 2012 at 03:01 PM
For your first problem, If you are using legacy particles, then just untick the box that says "Simulate in Worldspace" from the inspector.
I am unsure of how to fix this problem with the shuriken system(if it even occurs)
Hello there,yes I've tried that,but now it's just a still flame,it looks so unrealistic,we want it to move,but only a bit.
I don't understand, just change the settings of your particle system to animate the particles and make it "move"
But the problems is, I want when I move the Candle,the flame to follow like a normal flame. For example, light a candle and move it around,it's not gonna leave long trails behind it like $$anonymous$$e. That's the thing I am trying to achieve.
Answer by Screenhog · Aug 01, 2012 at 07:18 PM
Have you tried making your particle emitter create a very large number of particles per second with a very short lifespan (0.1 seconds)? Then your candle will still have some substance to it, but the tail can't possibly get too long, because the particles don't survive very long.
You'll probably need to give the particles some kind of default force as well to make sure that the particles actually travel some distance in their short amount of time.
As for the blurring problem, you could always render your character's arm and candle with a different camera than the one that renders the scene.
Your answer
Follow this Question
Related Questions
Fire doesn't turn on with script 2 Answers
Particle emitter works intermittently 0 Answers
particle emitter on/off using the left mouse button 1 Answer
Particle system question 1 Answer