- Home /
Question by
oflame · May 04, 2020 at 11:37 PM ·
particlesystemparticle systemparticleemitter
Alternative for worldVelocity
Is there any alternative for "worldVelocity" I am using Unity2018.2.0f2
if(old_sel_bird_dir != select_bird_dir) {
old_sel_bird_dir = select_bird_dir;
ParticleSystem tmp;
switch (select_bird_dir) {
case 0:
tmp = birds.GetComponent<ParticleSystem>();
if (tmp.worldVelocity.x < 0) {
tmp.worldVelocity = new Vector3(tmp.worldVelocity.x * -1.0f, tmp.worldVelocity.y * 1.0f, tmp.worldVelocity.z * 1.0f);
birds.GetComponent("ParticleRenderer").GetComponent<Renderer>().material.mainTextureOffset = new Vector2(0.0f, 0.5f);
}
break;
Comment