Quantcast
Channel: Latest Questions by Selzier
Viewing all articles
Browse latest Browse all 34

Play ParticleSystem on RayCastHit Object

$
0
0
I have a GameObject with a Particle System component on it (this is an enemy). I have attached a blood Particle Effect to enemy so when I hit the enemy, the blood will show. How can I play the Particle System on an object I hit with RayCastHit? I have tried everything I can think of over the past hour or 2, no luck: if(Physics.Linecast(playertarget.transform.position, attackrange.transform.position, out hit)){ if(hit.transform){ hit.transform.particleSystem.Play();

Viewing all articles
Browse latest Browse all 34

Trending Articles



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