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 not targeting - can you help?

Author
Message
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 3rd Dec 2003 22:31
I've shortened the code down to just the basics. The problem is I expected the code to point the camera at the 2nd object if shift is pressed. but the camera just points at 0,0,0.

Its probably something really stupid please could anyone explain to me why its playing up I would be grateful.

Coded in DBclassic.

Ok so its not a mouse.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Dec 2003 02:11
Hello

You currently have:


ANd when you are trying to call your function, you are not passing it the variables it needs.
Change it to:



Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 4th Dec 2003 19:58
Thanks a lot..
I didn't realise I had to push the variables through to the function as I thought the function would be able to get them as they were declared globally. evidently I was wrong..my bad.

anyway thx to you.

Ok so its not a mouse.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 5th Dec 2003 01:31
Global variables should work fine anywhere in functinos or otherwise.

If you are useing the Global command used by DarkEDIT, don't.
All it does is makes them arrarys.

ie if you say Global myvar, DarkEDIT will change it to DIM myvar(0) since arrays are globals.

Thus, it is easier to just declare your own arrays. (And it also means you don't have to rely on the DarkEDIT Global commnad)

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 06:16:32
Your offset time is: 2025-05-22 06:16:32