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 / free-moving camera and object problems

Author
Message
igitur
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location:
Posted: 22nd Nov 2007 18:29
I am giving a go at a game I wanted to make, reliant on physics and strategy to complete objectives. Right now I am starting out with the basics, a free-moving camera that rotates around the player model. However, I have hit a wall in development.

The camera does not follow the player right now, and the player, I don't think, rotates. Or at least the model does not. I think I have some misplaced variables, but if anyone could lend me a hand on how to make it so the camera will follow the player, but still be able to rotate freely around it, that would be appreciated. Also, how would I rotate the player model? I only have one angle value, so I do not have an x y and z separate. Here is the code, if anyone could help me clean it up...

Guyra
19
Years of Service
User Offline
Joined: 10th Nov 2005
Location: Norway
Posted: 22nd Nov 2007 21:02
Take a look at this thread: http://forum.thegamecreators.com/?m=forum_view&t=118177&b=7

Might be of use to you.
igitur
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location:
Posted: 22nd Nov 2007 21:50
Not quite, in one of my previous builds, I have the camera movement fine. It is just when I mix it with the player movement it doesn't work out...

My previous code was from the codebase, here it is:

igitur
17
Years of Service
User Offline
Joined: 23rd Aug 2007
Location:
Posted: 23rd Nov 2007 04:25
Do I need separate camera and object position values? Because the pcx, pcy, and pcz is where the camera points, which is the object, so I do not see why not...

Login to post a reply

Server time is: 2024-11-25 09:49:06
Your offset time is: 2024-11-25 09:49:06