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 / Camera following object.

Author
Message
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 26th Aug 2009 09:30 Edited at: 26th Aug 2009 11:41
Wel, I just made my camera to make you look around, but now the camera stay's on it's place and it turns around itself, what I want to try is make the camera always point your object, so that it's always in the middle of the screen. These are my code's:

Main:


CameraProperties:



PlayerProperties ( still just the test, didn't detail it. ):


And the header files are made, but i don't think they are neccecery for you to help me.

Already thanks for your help.
Tav
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location:
Posted: 29th Aug 2009 15:29

I think that's the right function
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 30th Aug 2009 18:04
I'm gonna try that out, thanks for your help.
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 31st Aug 2009 11:36
Well I tried it out, and it doesn't work, I still get the problem that the camera moves as if it where a shooter, but I want it to be like a 3rd person vieuw, like in mmorpg's.

Right now my code is this:


Camera:



I think it's because of the rotation code I use, but what command should I use to create the right rotation/movement.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Aug 2009 13:30


You need to use this in your loop and update the parameters each time, if your object you want to follow has id 1.



Then use your mouse to move object 1, the camera will follow automatically.

Login to post a reply

Server time is: 2024-10-01 12:39:34
Your offset time is: 2024-10-01 12:39:34