Hey guys. I'm trying to make a basic Metroid/Contra style side-scrolling shooter. Things are going great for the most part, but I'm having a few issues making my character turn. I've been messing around with the top answer in [this][1] post and have run into the error above.
Here is the code that is giving the error:
function Update ()
{
if (transform.eulerAngles.y == 180);
{
turning = true;
}
else if (transform.eulerAngles.y == -180);
{
turning = false;
}
}
The line the error is directing me to is "turning = true;" but there's no error for "turning = false;" which is what is confusing me. I'm basing this part of the code on some of my enemy ai functions(which I had help with), which work perfectly with no errors, so I have no clue what the issue is, unless the eulerAngles have something to do with it.
Also, I'd like to apologize for the godaweful formatting job I did...
[1]: http://answers.unity3d.com/questions/20713/rotating-a-character-180-degress.html
↧