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 / 2d to 3d cotrol

Author
Message
mido
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 21st Sep 2006 12:34 Edited at: 21st Sep 2006 12:37
here is the code



my proplem is that when i move the mouse up the object goes down and vise versa,so how can i fix it

If you hear a voise within you say "You can't program" then program and that voise will be silenced.
M25
Jack
21
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 21st Sep 2006 16:09 Edited at: 21st Sep 2006 17:24
Quote: "when i move the mouse up the object goes down"


use +number# not -number# or vice versa.
and mousex() is a integer not a float so this mousex#=mousex()
is unnessesary. mouseposx=mousex() is better for the performance.

And you must know that the 2d y position start at top and go to the
bottom. If you See a 3d scence from the top the 3d z posion start at the bottom and go to the top.



this is the correct code.



EDIT: Ops this is the DBC board.
-number# will only work in DBP
you shounld use number#*-1

here is the code for DBC:




mido
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 21st Sep 2006 21:20
thanks

If you hear a voise within you say "You can't program" then program and that voise will be silenced.
M25

Login to post a reply

Server time is: 2026-07-07 01:09:28
Your offset time is: 2026-07-07 01:09:28