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 / Need help with matrix+object

Author
Message
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 1st Dec 2003 15:53
Im making a strategy game, with a huge matrix, but I dont know how to get the matrix xyz when you click on spot (to select objects, etc)

Ive tried using

"Camera Position X() + (mousex() - S_width / 2) = object position x(w)"
AND
"Camera Position Z() + (mousey() - S_height / 2) = object position z(w)"

S_width = variable that holds screen_width
S_height = variable that holds screen_height

but this doesnt work correctly
Bishop
22
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 1st Dec 2003 19:28
people have made some really good examples....check out the code snippits

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."

Login to post a reply

Server time is: 2025-05-22 05:50:13
Your offset time is: 2025-05-22 05:50:13