Working on the menu
828
2
Advertisement
I've spent a good bit of time today working on the menu system. It now supports multiple menus, and actions bound to the menu items. The game now sports main, multiplayer, high score, options, and quit confirmation menus. Each one is on a different face of the cube, and as the player navigates the menus, the cube rotates to keep the proper menu on-screen and correctly-oriented to the camera. It almost works like I want it to.
When the command is given to switch menus, the camera's up vector is updated to that of the menu (each menu is aligned to a cube face, and each face has a different up vector). Then the cube rotates to center the active item on the new active menu to the view. This results in an abrupt twist before a smooth rotation for most menu changes. I think I may switch to quaternions for this rotation so I can slerp it. I've seen numerous posts in the fora cautioning people that the use of quats isn't the magical mystery cure, and that they probably shouldn't be used without being able to concretely state the benefits gained.
Well, I hope to use them so I can slerp from one orientation to the next. Once I get it working like I want it to, maybe I'll figure out how to take some video of it and post it on YouTube.
Edit: I was doing some Googling before going to bed, and found an old forum thread about matrix interpolation in which jyk mentioned that one could convert the matrices to an axis/angle rotation and then interpolate that. Not sure which method I should prefer.
When the command is given to switch menus, the camera's up vector is updated to that of the menu (each menu is aligned to a cube face, and each face has a different up vector). Then the cube rotates to center the active item on the new active menu to the view. This results in an abrupt twist before a smooth rotation for most menu changes. I think I may switch to quaternions for this rotation so I can slerp it. I've seen numerous posts in the fora cautioning people that the use of quats isn't the magical mystery cure, and that they probably shouldn't be used without being able to concretely state the benefits gained.
Well, I hope to use them so I can slerp from one orientation to the next. Once I get it working like I want it to, maybe I'll figure out how to take some video of it and post it on YouTube.
Edit: I was doing some Googling before going to bed, and found an old forum thread about matrix interpolation in which jyk mentioned that one could convert the matrices to an axis/angle rotation and then interpolate that. Not sure which method I should prefer.
Advertisement
Advertisement
Advertisement
Discussion