Development Log 3 - Liam McIntosh
Entering the Fourth Dimension
I shudder at the thought of programming any kind of object rotating in Unity because quaternions straight up scare me. Vector2 great, Vector 3 ok but add that 4th dimension and my brain just melts. The mathematical theory of the fourth dimension is so fascinating and intriguing but actually applying it is a different story. It’s such an abstract thought to think about an extra dimension because it just doesn't fit into our known 3D world. Unfortunately for me that's exactly what I had to do this week.
Here is a sweet video about the 4th dimension in games. Unrelated to my work by intriguing never the less.
There was a super weird bug when you tried to clamp the vertical rotation of the camera that we had neglected for a while and needed to be fixed. If you looked up and moved the camera around you would get these bone breaking rotations. This is where my dreaded quaternion work came in. I spent ages trying multiple different methods and I wasn’t getting anywhere. I was on this wild goose chase just trying anything from the internet that remotely looked like it would work. The problem was that i didn’t understand any of it. So instead of just slapping any code in I invested some time to learn about quaternions and visit my high school trigonometry again. It seemed to help because I eventually came across the solution by just sheer experimentation. I fiddling around with that elusive ‘w’ to see exactly what it was doing and my script worked! Although it’s not ideal process to a solution its a solution at that and I feel I have a better understanding of quaternions now.
Camera Tilt
Now that the camera was clamping currently without bugs I had to make an adjustment to how the camera functions. Originally the player camera was a direct child of the parent player object’s transform (The object that forces are applied to ). This was fine for a while however there was a problem when you tried to look up and down. When you moved your mouse up you up tilted your head up. We didn’t want this because the sword wouldn't follow the camera and you couldn't aim your swing . Instead we wanted the player to tilt at the hips so that your upper body and the sword will stay with you when you looked up and down. This meant changing up the mouse look code a little and parenting the camera to one to the model’s bones. Now if you moved the mouse up the Y input would rotate the spine around the x axis, making it tilt up and down perfectly!
However nothing always goes as planned and this solution created another problem. It so happened that the attack animations used that bone’s transform meaning that when I manipulated it in code it broke the animations a little. To fix this problem our animator Tom had to remove that bone’s key frames from all the animations to leave it free for manipulation!
Trouble Again
Once again there was a bit of a design clash between our team members concerning the combat system. Our most recent playtest didn’t go quite well and kind of crashed due to some halting bugs. Everyone got a little stressed and high strung and we go into a bit of an argument. However the crisis was averted for the time being after everyone went home for a nice night’s sleep. We all agreed to just continue with the swiping combat method due to the fact that we had already spent so much time on it anyway. Reverting back would just be a wasted effort on all our parts which was something we all could agree wasn’t a good idea. Now hopefully we can move on from this problem so that the project can continue. We plan to do a internal playtest between us by the end of the week to make up for the previous one. Once all the bugs are ironed out of course.
Deus Vault
If Quake and Chivalry had a child
Status | In development |
Author | DeusVault |
Genre | Fighting |
More posts
- Development Log 7 - Rhys GriffithsOct 13, 2018
- Development Log 6 - Rhys GriffithsOct 13, 2018
- Development Log 5 - Rhys GriffithsOct 13, 2018
- Development Log 4 - Rhys GriffithsOct 13, 2018
- Development Log 7 - Tom ForwoodOct 11, 2018
- Development Log 7 - Liam McIntoshOct 10, 2018
- Development Log 6 - Liam McIntoshOct 03, 2018
- Development Log 6 - Tom ForwoodOct 02, 2018
- Development Log 5 - Tom ForwoodSep 19, 2018
- Development Log 5 - Liam McIntoshSep 19, 2018
Leave a comment
Log in with itch.io to leave a comment.