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 / centre camera behind/above/looking down on player object

Author
Message
JustSuds
16
Years of Service
User Offline
Joined: 3rd Nov 2008
Location:
Posted: 24th Jan 2009 13:54
background
I'm just starting to adjust to darkGDK, and i'm experimenting with a semi-tile based RPG; the player runs around on typical rpg maps, interacting with objects in a typical fashion, but scattered through these maps are essentially grid-like matrixes, where an action can be performed on individual tiles. having only just started, i'm trying to weed out the basic movement and camera control.

the problem
if i leave the camera directly above the object, there is no problem with it turning to face the same direction as the player. However, when i set the camera to hang back, so the player can be seen, when the player turns, the camera turns the same way, causing it to look AWAY from the player.

question
how can i make my camera follow my player in a typical rpg fashion? (hanging back, a bit above, facing the back of the character)

this is my game loop:



please and thankyou!

- JustSuds. . . JustLimitless
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 24th Jan 2009 16:58
try this:
JustSuds
16
Years of Service
User Offline
Joined: 3rd Nov 2008
Location:
Posted: 24th Jan 2009 17:35
Thanks, but i'm still faced with the problem of the camera not continuously looking at the player object.

i tried this line:



with syntax:



this partially solved my problem, the player stays on screen almost all the time, which is completely acceptible. However, the camera doesn't always remain behind the player, it stops while facing side-on or even front-on.

The ideal solution to my problem would have the camera tailing along behind the character with little freedom.

- JustSuds

C:\> If you're happy and you know it, syntax error!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th Jan 2009 21:19
Quote: "The ideal solution to my problem would have the camera tailing along behind the character with little freedom."


Do you want the camera to always be looking at players back(camera turn and reposition behind player) or do you want the camera to generally be facing the same direction at all times (camera just reposition)?
mamaboy
15
Years of Service
User Offline
Joined: 24th Jan 2009
Location:
Posted: 25th Jan 2009 03:42
how about dbwkey ? got this syntax or not ?
JustSuds
16
Years of Service
User Offline
Joined: 3rd Nov 2008
Location:
Posted: 25th Jan 2009 04:28
i'm looking for the camera to turn and reposition behind the player's back.

- JustSuds

C:\> If you're happy and you know it, syntax error!

Login to post a reply

Server time is: 2024-11-25 13:19:05
Your offset time is: 2024-11-25 13:19:05