Quantcast
Channel: Answers for "How to move direction of particle(s) emitted by ParticleSystem Shuriken"
Viewing all articles
Browse latest Browse all 4

Answer by Legend of Hibiki

$
0
0
to follow you create a script and attach to your shuriken i'm portuguese "rotacao" it's max rotation that your shuriken can do; and "tempo" is the maximo time that shurikens are on the field; var target : Transform; var tempo : float =0; function Update(){ tempo+=Time.deltaTime; transform.Translate(Vector3.forward*Time.deltaTime*speed); if(rotacao>=-40 && rotacao<=40){ var relativePoint = transform.InverseTransformPoint(target.transform.position); if (relativePoint.x < 0.0){ transform.Rotate(0, rotacaospeed*-1 , 0); rotacao-=rotacaospeed; }else if (relativePoint.x > 0.0) { transform.Rotate(0, rotacaospeed , 0); rotacao+=rotacaospeed; }else{ transform.Rotate(0,0,0); } } if(tempo>=2){ Destroy(gameObject); } }

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>