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 Angles

Author
Message
CoolkeG
15
Years of Service
User Offline
Joined: 11th Aug 2009
Location:
Posted: 12th Aug 2009 06:50
Ok my first posy woot
ok so my problem is with the camera angle, i have managed to laod an onject (my char) onto a terrain (used in the tut), i can then make a camera, get the camera to follow my char relative to his possition and i understand all my code so far, my problem however lies with the camera angle when i use the W/S keys, i want the keys to make the camera move up in hight, closer in distance and rotate the angle to point down and i want the total opposite for the S key, like in all MMORPG's when u press the up or down key it scrolls over the head of the char and down will pul lthe camera to the floor. So i am wondering how to make this possible in relation to my code. this is what i have so far


Also i have so far tried to make the W button (KeyCode 17) add values to the height and distance whitch works fine, my problem lies with changing the relative camera angle,i figured out that it is the Z axis but whenever i try changing that value in the
if(KeyCode) {} section it doesnt work at all, it zooms into my char straight away and then slowly glitches to point to a side angle.

all help is greatly appreiciated.

thx very much in advance guys.

even the life you lead is borrowed because your not promised tommorow
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 12th Aug 2009 16:43
I do something similar in my game but I just adjust the height only and not the distance, but I can see why you want it the way you do.

Quote: "Also i have so far tried to make the W button (KeyCode 17) add values to the height and distance whitch works fine, my problem lies with changing the relative camera angle,i figured out that it is the Z axis but whenever i try changing that value in the
if(KeyCode) {} section it doesnt work at all, it zooms into my char straight away and then slowly glitches to point to a side angle."


This part I dont really understand, are you rolling your camera around the z-axis, this is surly not what you want. When you say "changing the relative camera angle" does your dbPointCamera function not take care of this for you?

I will run your code later as I could also benefit from a solution and I will get back to you if I figure it out.

Login to post a reply

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