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 / moving camera up help plz

Author
Message
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Jan 2005 03:06
hey all,
how can u make the camera \"slide up\" meaning not jump, if im using:
move camera 1
turn camera left 1

To control it, i tried:
position camera camx#,camy#+1,camz#

but that just make it jump up to one above the original until i press again, also it repositions the camera at the starting point

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Jan 2005 03:43
Um I think you could do:


also i really would rcommend not using the 'turn camera left' commands, its much more reliable to use the rotation commands in my mind...someone might dissagreee with me though !
Hope it helps
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Jan 2005 05:01
thanks but when i say im using camx#,camy#,camz#, those are variables that have been assigned the value of the camera position x, camera postion y, and camera position z, and ill use the rotate

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Rye
21
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 26th Jan 2005 06:01
what your doing is positioning the camera camy#+1. what you want to do is increase camy# by 1 so that it increments.

if upkey()=1 then camy# = camy#+1

that'll do it.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Jan 2005 07:06
when i do this it doesnt move the camera forward or back, i know why, its because i have the variables camx#,camy#, and camz# defined and if i position the camera during the loop, which i have to do for "camy#=camy#+1", but to move the camera im using "move camera 1" like i said before, so any ideas how i can fix this?

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 26th Jan 2005 07:12
Could you post your code, or if its way too long then just the section in question, then we can have a butchers, and also spot any other potential problems !
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Jan 2005 08:54
k, ill post the section, but i dont wanna post the whole code, cause its long, and its the source code of a very in depth game, and i wouldnt wanna give that away , but ill post the control player section. here it is (its been edited from the original version, such as the do loop, is really a function, and the matrix is there just to orientate )-


(if u take out the position camera part in the main loop then u can move the camera, just not up and down)

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Jan 2005 09:59
someone help plz

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 28th Jan 2005 10:15
Ok the problem was you stored the positions of the camera, then moved the camera, and then positioned the camera back where it started,now i have roughly fixed the code so it functions but to make it neater see my version below (also i dont use turn object left and right as i have known them to cause problems).



Your Version with the rotate command


or how bout the super short version !


Hope it helps
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 28th Jan 2005 10:28
thanks, got it working

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 28th Jan 2005 11:17
No problem, any time

Login to post a reply

Server time is: 2024-09-23 10:17:58
Your offset time is: 2024-09-23 10:17:58