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.

Newcomers DBPro Corner / 3rd person shooter camera

Author
Message
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 10th May 2008 23:01
Ok, I haven't programmed for a really long time, but today I decided to start to get back into it. I decided I wanted to make a basic 3rd person shooter, but I've seemed to hit a problem. I want it so as I move the mouse and rotate the camera, the player object rotates with it so it never leaves the screen, but also stays a bit of a distance infront of the camera so you can still see it. However, I've tried a few different things, and I just can't seem to get it right.

Here's my basic code without my failed implentation of the object rotation:



This is where my signature would be If I had one.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th May 2008 03:42
Hallo Gamedesign er20 . Just change this piece of code:




for this piece of code.



cheers

oh my god
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 11th May 2008 05:15
Chafari, thank you very much, that's exactly what I was looking for. It's amazing, only add one line of code, edit two others, and the whole thing works perfectly

This is where my signature would be If I had one.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th May 2008 17:55
lol Enjoy it !!

cheers.

oh my god
MRM
16
Years of Service
User Offline
Joined: 12th May 2008
Location:
Posted: 12th May 2008 20:21
WOWWW I've been looking for this so much !!!! thanks chafari and Gamedesign er20 !!!

Learn, learn, learn ...

Login to post a reply

Server time is: 2024-11-25 03:48:50
Your offset time is: 2024-11-25 03:48:50