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 / hmm, pretty n00b :P

Author
Message
Jurgen
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location:
Posted: 6th Jun 2003 00:08
hi there, please study these lines of code....

if camera position y()>2 then position camera camera position x(), camera position y()-0.1,camera position z()
if camera position y()
"Only when all the seas are poisened, only when all the trees have been cut only when all the animals are killed, people will understand that money can't be eaten..."
Jurgen
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location:
Posted: 6th Jun 2003 00:10
wtf.... why is it doing that??

here is the correct code (sorry admins, I hate windows too )

hi there, please study these lines of code....


if camera position y()>2 then position camera camera position x(), camera position y()-0.1,camera position z()
if camera position y()<2 then position camera camera position x(), camera position y()+0.1,camera position z()

What I wanted to do is move the camera when I pressed the "w" key, I did that, but when I looked up and pressed "w" I kind off flew around in the world... not what I wanted, I used the move-camera command to move the camera, the lines of code above prevent the camera of going above and below the 2... but when I look below I move slower then when I look in front of me, pretty normal, but not what I want?!

How would you handle the problem, no matter what angle I am facing...........................

[movement code]
if keystatus#=17 then move camera 0,0.1
if keystatus#=31 then move camera 0,-0.1

do help me

"Only when all the seas are poisened, only when all the trees have been cut only when all the animals are killed, people will understand that money can't be eaten..."
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 7th Jun 2003 00:12
the move camera command will move you forward at an angle..when your camera angle is a "facing down or up" angle the move command will lower or raise it beyond the 2 limit thus the code will continously trigger the correction and meanwhile hook your camera in the same x and z positions .. i think it's that..but not sure
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 7th Jun 2003 00:31
Here is some code that might help you, there is some new and better movement code in the snippet too!

lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 7th Jun 2003 00:33 Edited at: 7th Jun 2003 00:38
Sorry here is the right code



Mattman
23
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 7th Jun 2003 01:31
Wrong code. AGAIN?!?
Please Post the right code!!!

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
---Andy Rooney
Mattman
23
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 7th Jun 2003 01:34
Scratch that
Sorry lcfcfan, I thought DiVandDarkbasic got it wrong :-s

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
---Andy Rooney
Jurgen
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location:
Posted: 7th Jun 2003 19:05
heyheyhey..... not twice (this time )

"Only when all the seas are poisened, only when all the trees have been cut only when all the animals are killed, people will understand that money can't be eaten..."

Login to post a reply

Server time is: 2026-07-10 18:11:14
Your offset time is: 2026-07-10 18:11:14