Topic: Spawning particles with a local offset

Ive been working on particle attacks with my game.

The current code uses an offset in world space, so when I rotate on the z-axis, it goes way off.
Does anyone know how to spawn a particle in local space, relative to the body part being used to spawn it?

Share

Thumbs up Thumbs down

Re: Spawning particles with a local offset

Steviebops wrote:

Ive been working on particle attacks with my game.

The current code uses an offset in world space, so when I rotate on the z-axis, it goes way off.
Does anyone know how to spawn a particle in local space, relative to the body part being used to spawn it?

Have you tried parenting a particle effect to an empty gameObject and spawning that instead of a particle effect by itself?  That normally fixes any rotation problems I have when particle effects are involved.  It makes it easier to mirror them as well.

Re: Spawning particles with a local offset

It's using the projectile system, so it spawns it's own gameobject.
Because Im using my z-axis code, the mirroring isn't really a factor.

Share

Thumbs up Thumbs down