|
Hi im making a 2d/3d td. ive made it so that the enemies follow waypoints, but when i kill the enemy they just dissaper. i added a blood particle effect. but it only works if it spawns horizonaly. but when i destroy my enemy it dosn't spawn horizontally. it spawns where the object that destroyed it hit it. so my question is, how do i spawn an explosion that spawn horizontaly, and directly in the center of my enemy?
(comments are locked)
|
|
You could attach the particle emitter to the center of your enemy prefab, normally turned off. When he's hit, turn it on. Set the velocity vector on X and/or Z but zero on Y. exactly how would i do this?
Aug 01 '12 at 05:38 PM
Major
You must have an enemy prefab, am I right? If so, you just add the particle emitter to that prefab, and set it to NOT emit. But while you're editing, make sure the velocity is, say, 0,0,1 to spurt in the Z direction. Then turn emit off. Now your enemies will walk around with this inactive particle emitter. When you detect they've been hit, you get the enemy's particle emitter component, and set emit to true. Are you using legacy or shuriken particles?
Aug 02 '12 at 01:42 AM
DaveA
I am using shruiken.
Aug 08 '12 at 11:47 PM
Major
Its fine i'll just use a puff instead. I think the problem it with the shruiken it self. I think it might need a little more work. :)
Aug 10 '12 at 05:36 PM
Major
(comments are locked)
|
