i am trying to make the particles come out facing at the angle OPOSITE of where the bullet was aiming but....nope, they always come out at the same angle, could anyone explain why?
if (collision.gameObject.tag == "Wall")
{
float trialboo = this.transform.rotation.z;
GameObject richochet = Instantiate(ricochetParticles, particleSpawnPoint.position, Quaternion.Euler(0f, 0f, 0f));
ParticleSystem richochetps = richochet.GetComponent<ParticleSystem>();
var shape = richochetps.shape;
var rotationpower = this.transform.rotation.z- 45;
shape.rotation = new Vector3(0f, 0f, rotationpower);
richochetps.Play(); shape.rotation = new Vector3(0f, 0f, rotationpower);
print("winning");
// Destroy(collision.gameObject);
}
Destroy(this.gameObject);
}
}