Hi!
Simply, I want to add a rotation to an existing gameobject’s rotation.
For example, I have (0, 0, 50) and I want it to be added to rotB (0, 0, 0).
I’ve tried this code:
rotB *= Quaternion.Euler (0, 0, 50);
But the result is so weird, something like (2.53543, 7.54353534536, 50).
Any ideas ?
2 Answers
2
Have you tried:
rotB = Quaternion.Euler (rotA.eulerAngles.x,
rotA.eulerAngles.y,
rotA.eulerAngles.z + 50f);
One other thing to make sure of, look closely at the inspector position x, y, and z values. sometimes it cuts off the scientific notation at the end of the float, so 2.53543e-10 looks like 2.53543, when it’s actually essentially 0, but some floating point rounding made it look non-zero. Just something to check.
You're setting the "isSpeaking" to true at the start of this, but not starting the audio yet from what I can see? Also, from your comments it looks like "AnharmonicSynthSFX.KITTpoliceChaosImitationFX();" toggles a given effect? Is that what plays the audio?
– TreyHThanks @TreyH, Yes You are Right, I think what I ned to do is set up a new bool that I could Call: "PoliceChaosActive = false" And Track it with that bool ;)
– KnightRiderGuy