Modifying the code to be time based rather than frame based

Depending on your computer, the model in the scene might be moving quite fast or quite slow or just at the right speed. The reason for the different speeds at which the model might move is that, in our code, we move the model 0.1 units on the z-axis before a new frame is rendered every time. A new computer might be able to render the scene with 100 frames per second; this would move the model 10 units per second. When using an old computer, we could have 30 frames per seconds, then the model would only move 3 units. This is only one third, as compared to the new computers. Normally, we want our application to be consistent across different platforms and capabilities so that it will run ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.