Topic: Particle created effect Facing question

ok, i was using the particle effect to call a prefab, wich is actually another animated model, for an attack like a kamehameha or shinkuu hadouken, so it appears that my characters transforms into this Jaguar and it throws the attack from his mouth, but the effect always faces the same direction, regardless of the side, is there any way to make it face the same direction as my character?

Thanks!

http://s5.postimg.org/apwnbwdiv/fx_facing.jpg

http://s5.postimg.org/ysdh6ru5z/fx_facing2.jpg

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

Re: Particle created effect Facing question

I think I've solved this.  Please see if it works for you....

Share

Thumbs up +1 Thumbs down

Re: Particle created effect Facing question

mmm.... i'm having some problems, it returns this errors

Assets/UFE/Scripts/ControlsScript.cs(937,80): error CS0103: The name `pTemp' does not exist in the current context
Assets/UFE/Scripts/ControlsScript.cs(937,116): error CS0103: The name `pTemp' does not exist in the current context
Assets/UFE/Scripts/ControlsScript.cs(937,158): error CS0103: The name `pTemp' does not exist in the current context
Assets/UFE/Scripts/ControlsScript.cs(937,193): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments

Assets/UFE/Scripts/ControlsScript.cs(937,193): error CS1503: Argument `#1' cannot convert `object' expression to type `float'

Assets/UFE/Scripts/ControlsScript.cs(937,33): error CS0103: The name `pTemp' does not exist in the current context

i think that maybe it has something to do with the fact i used this fix for move trails and maybe it's conflictuating:

YumChaGames wrote:

Not sure if this was missed or is already fixed for next update, but the Sticky and Bodypart variables on Particle Effects don't work (I kept getting a null exception error when the particles were cast, but non-sticky works fine).  I was in the process of doing a convoluted hack to access the character's bone transforms, when I eventually noticed you have a HitBoxesScript.getTransform.  This works GREAT!  We can now create simple particle effects to simulate slashes and attack lines without need of baking into FBX (which I have no idea how to do anyway tongue).

So here's the single line of code that needs to be changed to make it work properly (the particle to stick to the body part):

In ControlScript.cs, change:

if (particleEffect.particleEffect.stick) pTemp.transform.parent = transform;

to:

if (particleEffect.particleEffect.stick) pTemp.transform.parent = myHitBoxesScript.getTransform(particleEffect.particleEffect.bodyPart);
Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

Re: Particle created effect Facing question

Make sure that pTemp bit you added is after pTemp is declared (GameObject pTemp = Instantiate(...)).  I've edited the other post to reflect this also.

Share

Thumbs up +1 Thumbs down

Re: Particle created effect Facing question

JAGUAR BEAM!
http://s5.postimg.org/rmjffg8dz/jaguar_BEAM.jpg

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.