Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
609 views
in Technique[技术] by (71.8m points)

unity3d - Unity ParticleSystem.Simulate API under world space work wrong

the Particle System is set to simulated in world space, and i manually call simulate function from script, but it works still like in local space , that means the particles are like moving with emitter. i guess the simulate API don't memory the position of emitter ,so it will always simulate from current position , so it still works like local space. has anyone known a solution to make it still work like in world space when manually simulating?

void Update()
{
    ParticleSystem ps = this.particle.GetComponent<ParticleSystem>();

    ParticleSystem.MainModule mainModule = ps[j].main;
    mainModule.simulationSpace = ParticleSystemSimulationSpace.World;

    ps.Stop(false, ParticleSystemStopBehavior.StopEmittingAndClear);
    ps.Play(false);
    ps.Simulate(playbackTime, false, false, true);
}

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...