Original Post
I'm in the process of developing a game's menu system using directx and i'm having trouble defining my algorithm to move the menu entities around.. I decided on a rotating menu system whereby it would have a number of menu options in 3D world space which lie on the same plane but rotate about a central point. the closest menu entity (at position x=0,y=0,z=radius) would be the one currently highlighted and the user would be able to use the left and right arrow keys to rotate the menuItem around for selection.. So far my SetupRotator() function takes an array of menuItems and positions them around a central point with even spacing in between each one by calculating the distribution of the sum of the items using the angle between each item about the y-axis. The RotateAngles() function is called each frame (provided the user pressed one of the arrow keys telling the menu to rotate)and does the following..: - retrieve the time ellapsed since the last call and calculate the amount each menu item should have moved in that time.. - set the rotations of each menu item using the value retrieved from the previous step.. - use the rotations to calculate the new positions of each menu item in the worldspace.. Also the function is supposed detect when the current angle of rotation about the centre is greater than the angle between two menuItems (making sure the rotation stops once the next menu item has reached the forefront/highlighted position) and re-adjust rotations to stop them to put them where they should be.. The problem is this.. my code to calculate the angle of rotation moved over the ellapsed time, and my code to calculate the new positions of each menuItem doesn't seem to work properly and I seem to get one item moving (but not quite far enough), another not moving at all and the last sails off into the distance.. Could anyone help me define a decent algorithm to make this work or maybe even help by advising a better method of handling the entire rotation per frame movement..?