Reputation: 986
i have a 2d head that has just been cut off. Theres a particle effect of blood where it was connected to the neck so that point is always the same.
Now the head is starting to spin and as the particle effect is a child of the head, the blood is spinning with it.
Locking the rotation doesn't seem to work, it locks the rotation but I always want the blood to be dripping vertically down. Something like how a big wheel ride is spinning while the carts are always facing down.
This is what i tried for locking, the world and local rotation:
bloodTrailEffect.transform.eulerAngles = new Vector3(90, 0, 0);
bloodTrailEffect.transform.localEulerAngles = new Vector3(90, 0, 0);
Ive tried to capture a picture of what i mean:
So that trail of blood should be straight down. If it spins anymore, the trail starts to actually accelerate up which looks abnormal.
Upvotes: 3
Views: 71
Reputation: 678
I am pretty sure there is an option on the Particle System that makes the particles world space, have you tried this?
Upvotes: 0
Reputation: 3108
I tried reproducing it myself, i has a spinning sprite, attached a ParticleSystem
to to top middle of the sprite.
Then i attached this script to the ParticleSystem
using UnityEngine;
public class KeepRotation : MonoBehaviour {
Quaternion rotation;
void Awake()
{
rotation = transform.rotation;
}
void LateUpdate()
{
transform.rotation = rotation;
}
}
It just keeps setting the original rotation back..
Upvotes: 1