Wednesday, April 21, 2010

Why the orientation wasn't working...

Ok, so, after I told Bruce my idea of how to orient the player, he implemented it and it didn't work mysteriously.
Instead of trying to figure out why it didn't work, we decided to try out different ways of doing the player orientation.
Two days later, after 5 or so different ideas hadn't worked, we decided to go through the code... It had to be something else that was messing things up.
Right now, I wish we had done that since the beginning...
After two minutes of looking through the code, I realized we were getting wrong normals for the surfaces...
I felt like a total n00b for not finding out that error earlier... But, to my defense, neither Bruce and I had done the module which handled the normals.
Apparently, the normals were created at the beginning and then NEVER updated...
And, considering this is a game were the level is constantly moving, that's a HUGE mistake.
So, I did a function that just re-calculates the normals. However, this now caused more problems, since the previous collisions were made to work with the WRONG sets of normals... That's what people who hack through code usually do...
This issue has taken us longer than we wanted. At least I finished my tasks early so I can now spend time helping solve this.

No comments:

Post a Comment