I am rotating a gameobject that has a child game object with a particle effect on it.
It's a missile with engine exhaust.
I am rotating the parent game object but the particle effect child objects do not rotate:
The missile object has this script on it:
void FixedUpdate () {
Vector3 dir = targetObject.position - transform.position;
dir.Normalize();
float zAngle = Mathf.Atan2( dir.y, dir.x ) * Mathf.Rad2Deg - 90;
Quaternion desiredRotation = Quaternion.Euler( 0, 0, zAngle );
transform.rotation = Quaternion.RotateTowards( transform.rotation, desiredRotation, 10.0f * Time.deltaTime );
rigidBody.AddForce( transform.up * 10.0f, ForceMode2D.Force );
}
Particle Effect:
Anyone see what I am doing wrong?





ParticleSystemcomponent. If you're using theVelocityOverLifetimemodule, set yourSimulationSpaceof the particleSystem toLocalinstead ofWorld. \$\endgroup\$Local\$\endgroup\$