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 / Another ? to further your hatred towards me!

Author
Message
Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 2nd Aug 2004 15:43
OK. I'm have gotten the coding correct for the mouse to control the camera angle, but I cannot move forward or strife (which is the latest addition in this tutorial). I believe the problem is that I am starting outside of the matrix, where I have checks to make sure that I do not move off of it. Here is the code:
I am sorry to keep asking ?s, but I am trying to finish these tutorials, then I will begin with my own simple game. Thank you all for being patient with me!

Fraggles where quite the scary lot...
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Aug 2004 16:06
Indeed that was it Here is the code to get you around that and to place the camera in the middle of the matrix. I put comments in to all I changed and marked changed areas of the code with *************

Also you will probably not like the method of moving that is used here as it does not allow for the change in camera direction. I will let you continue with the tutorial as it may show you a way around this. If you need any help with it just post a message.

Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 3rd Aug 2004 02:14
Thank you! Works well now! only prob is that when I push forward, i only move in the direction that I was facing when the program started. IE: When I use the mouse to turn right, and then press up, I move to the left. Same direction as I was in when it started.

Fraggles where quite the scary lot...
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd Aug 2004 03:57 Edited at: 3rd Aug 2004 05:32
Yeah thats what I was talking about with the movement controls.
[edit] Will check back when I get home. To see if you got it. Let me know how it goes.
[edit2] If you have the Retail version of DBP (I know the cd version has it) I would recommend going through the FPS example/tutorial that comes with DBP.

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 3rd Aug 2004 05:37
Yeah, you need to have an X & Z movement angle applied to the camera, so you can update the position in the direction you're facing.

Any truly great code should be indisguishable from magic.
Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 3rd Aug 2004 09:51
Oh OK, sorry, I didn't quite understand what you meant, as I was at work and had not tried it out yet! I'll continue on with the tut! Thanks!

@SandraD: Thanks! If I continue to have problems with it after doing the next tut, I'll try that (maybe that is the next tut )

Fraggles where quite the scary lot...
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd Aug 2004 13:00
Well good luck. Let us know how it goes.

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 3rd Aug 2004 13:17
Sir Spaghetti Code;

Well, what I meant is -- say you are facing North, the normal angle of the camera. That is the same as zero degrees. If you turn right, you can face North-North-East, North-East or East as you choose. These are 22.5, 45 and 90 degrees respectively. When you walk forward, the angle of the direction you're going determines how much you move in the X & Z directions, using in DB the NEWXVALUE and NEWZVALUE commands based on your heading. (Or direction.) That's really how easy it is....

Good Luck,
S.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2024-09-22 19:32:33
Your offset time is: 2024-09-22 19:32:33