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 Movement Problems

Author
Message
White Mail
21
Years of Service
User Offline
Joined: 13th Nov 2003
Location: Here and Now
Posted: 12th Apr 2004 22:32
<glow c=fire> <i> We can't get the camera rotation to work! it just makes me face the ground. </i> </glow>

can you help? pleeeeeeease?

~1st
Bishop
22
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 13th Apr 2004 02:59
change this line: if leftkey()=1 then rotate camera 0,y+2,0
to this:
if leftkey()=1 then yrotate camera wrapvalue(camera angle y()+2)

you were trying to rotate the camera based on the cameras position....since the cameras y position is 2, it is saying, rotate the camera 4 degrees.......but you need to tell it to rotate the camera it's current yangle + 2 degrees.....hope it helped...

do that, then you will be in good shape....

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Snaz
21
Years of Service
User Offline
Joined: 12th Apr 2004
Location: Romania, Galatz
Posted: 13th Apr 2004 13:42
Try this code:..if you're using a 10000/10000 matrix...if you don't change the x# and z# to your matrix size/2

phonfnd

Login to post a reply

Server time is: 2025-05-30 11:39:30
Your offset time is: 2025-05-30 11:39:30