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 / 3rd Person Camera

Author
Message
Grimdoomer
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 27th Sep 2009 08:08
I'm trying to make a 3rd person camera, and so far it works. But when I try to look to the side, the camera just looks behind the player mode. I need it to rotate around the player model, but I can't seem to figure out how.

SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 28th Sep 2009 02:43 Edited at: 28th Sep 2009 02:46
this is the code directly from my project (you can disregard the parts about zoom and the parts about the joystick). Also since ive been using colonel-x as my test model i have a line that turns him around so you may need to take that out as well.

Grimdoomer
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 28th Sep 2009 04:35
Thanks! After messing with it for some time, I only needed the code to rotate colonel-x. Now I have another problem. When I try to move colonel-x fowards or backwards, the camera moves up or down, the amount I'm moving him. So if I move him .5 units foward, the camera moves .5 units up. It's very annoying. Is there any way I can move him around based on the direction he is facing without calling dbObjectMoveUp/dbObjectMoveDown?
Grimdoomer
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 28th Sep 2009 20:01
I fixed it. I set a boolean value indicating if my player was moving up or down, then I added/subtracted the amount I was moving them up or down from the camera y pos.

Login to post a reply

Server time is: 2024-11-25 00:52:35
Your offset time is: 2024-11-25 00:52:35