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.

DarkBASIC Discussion / camera help

Author
Message
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 11th Nov 2003 07:14 Edited at: 11th Nov 2003 07:17
i need help with making it so when i press left it moves the camera to the left NOT ROTATE, and right when i press the right arrow.

i also was playing around with this code here

and changed the 20s to 50s
and got the following results (BMPs sorry)

with the 20s
http://www.geocities.com/deathlink84095/2020.bmp

with the 50s
http://www.geocities.com/deathlink84095/5050.bmp

that is the ONLY thing i changed. i just ran my program, hit the prntscrn button, didnt touch one other button. any help on why it is doing that?

now that i have played around "in game" a bit, i find that the view changes from the roughness of the terrain, but that brings up another question. why is it more rough when i use more segments?

Two words, moo.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Nov 2003 14:23
1)
The camera, to move it left and right, use


2)The terrain becomes "more rough" because, i assume you are useing the Randomize Matrix command, therefore, when that command is called, it randomizes the height of every single point on the matrix within the value tha tyou specify.
And since you made the matrix have 50 segments rather than 20, there is then ALOT more points (to see this, put on wireframe for the matrix and chenge the values, you'll see the difference). And when the matrix is randomised, each point is changed, therefore the more segments (ie the more points) you have in a matrix, when it is randomized it appears more "rough"

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 01:48
it didnt work, but im sure that its just my stupididy.
i really dont quite understand how the camera works. but heres my code.


Two words, moo.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Nov 2003 05:32
Ok i changed this:


To this:


Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 05:54
awsome! thanx a lot! with that done, i can finaly get my program workin!

Two words, moo.
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 06:05 Edited at: 12th Nov 2003 06:27
ok now i have another problem.
iv been trying to get this to work, iv been reading the tutorials and such to try and get this to work, but i cant seem to get it to work

mouse view. i want it so when you move the mouse, it moves your view.

also, what do you put if you want to make it not equal to? (<, >, <=, >=, =, ??)

Two words, moo.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Nov 2003 07:06
ok, for mouse view im not too sure, sorry...

But, for the not equal to, its <> ie, both the greater than and less than symbols.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 07:08
okey, i got it working. but now i have another problem: (sorry, im just learning how to use the camera, so i am confused!)
it'll be easier to explain if you see my program in action


alrighty then. you should be able to just copy and paste that in and it will work. arrows move camera forward,backwards,lt,rt, mouse wheel moves camera up/down, amd we've got mouse look.

what i want it to do, is move forward when you press up no matter what way you are looking, and the same for all directions. and if you run the program you will see what it is doing.

Two words, moo.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Nov 2003 09:00
Ok, my examples that i gave you were not fully correct, i appologize, here is your code:


Change this to:


You will notice that both the x and z values need to be updated for the positioning to work in 3 dimentions, previously, it was only calculating for the x value for the strafing and the x value for the movement, where as it should have been calculating for both values...

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 18:18
ok awsome! i'll try this when i get home

Two words, moo.

Login to post a reply

Server time is: 2025-05-21 16:16:54
Your offset time is: 2025-05-21 16:16:54