Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / WoW-style Camera?

Author
Message
Drowneath
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location: In your eyes
Posted: 6th Jul 2009 20:17
Hello there,

Could anyone tell me a code snippet that can make this kind of camera, BUT without rotating the target object? (only the camera can rotate around the object)

Like this one: http://www.youtube.com/watch?v=GrMbzpp6IU8 (but the game in this video rotates the object too)

Well, say I have a cube with ID 1 as the object (player)
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 6th Jul 2009 22:40
I'm not going to give you a code snippet. But try doing it like this:
each frame:
1 - position camera at same location of object
2 - point camera way you want it to be facing (use a variable to track rotation around y, based on arrow keys or w/e, and use the other two as constants)
3 - move the camera backwards a fixed amount.

Potassium
15
Years of Service
User Offline
Joined: 12th Jul 2009
Location:
Posted: 13th Jul 2009 21:45
The owner of that particular video sent me the code for it. He just removed the terrain and replaced it with a matrix, and the model with a cube. But it might help to study the code snippet.

Login to post a reply

Server time is: 2024-10-01 05:55:36
Your offset time is: 2024-10-01 05:55:36