#### Archived

This topic is now archived and is closed to further replies.

# Need a little help

This topic is 5812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys im very new to the forum but have been reading gamedev for quite a while. Im doing MSc in Games technology in Scotland. Im currently revising for Games Programming exam and have a question I need some help with. Problem: There is a spinning camera in the centre of the empty room. In one corner there are loads of objects. Obviously the camera will slow down on this corner. So rendering must be managed so it spins with same speed. What needs to be done? (answer is not a fixed angular increment?) Any ideas? will appreciate any answer. Thanks

##### Share on other sites
This is a simple question of how to keep movement of anything constant for changing framerates. There is a high precision method for this, and a low precision method.

The low precision method is as good as you need for something that has a constant movement (or angular as in this case) velocity. All you do is each frame you test to see how long the frame took. You need to learn timing for this. Set your camera''s angular velocity to whatever you want, and determine what units the velocity will be in. For example, let''s say that I make my camera''s velocity be in radians/second. Then say I set the velocity to 1.

In the code, I''d do something like this:

cameraRotationY += cameraRotationVelocityY * difference/1000.0f;

Basic. If you have a slower framerate, the difference will be greater, and the camera will move more that frame.

--Vic--

##### Share on other sites
Thanks!
Whats the high precision method then? The question was actualy about helicopter simulator. Would it make a difference? as it spins in different directions?

cheers

1. 1
2. 2
Rutin
20
3. 3
khawk
16
4. 4
A4L
14
5. 5

• 11
• 16
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633755
• Total Posts
3013706
×