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 / Moving Object with camera

Author
Message
Munro
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 14th Nov 2008 06:36
Hello I've folowed some tutorials and I came up with a code that displays a camera right behind a character. Now I dont know how to move the object with the camera and need some help.
-is there an easier way to make a character/player?
-whats an example code that moves the camera with the object(an if statement with dbkeydown I'm guessing)
-some commands or advice to make a playable character
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 14th Nov 2008 11:06
I'm using this code to move the player using WASD or arrow keys

Notice that pl is my player object.



Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Munro
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 14th Nov 2008 23:49
does this go into the main loop?
Swordsman
16
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 15th Nov 2008 10:04
You would call it from the main loop, yes.

The rule is that if you want it to update every frame (like camera position, etc) it goes in the main loop
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 19th Nov 2008 09:39
it is simple logic.. look up the command "dbMoveObject"

Login to post a reply

Server time is: 2024-11-25 07:56:08
Your offset time is: 2024-11-25 07:56:08