This is DBPro code. It has been tested by me and it works. It is basically a revision of the code previously posted at:
http://darkbasicpro.thegamecreators.com/?m=forum_view&t=27469&b=6 and
http://darkbasicpro.thegamecreators.com/?m=forum_view&t=27455&b=7
As both Red Eye and GuruSY asked for the ability to pitch the camera up and down I've revised my previous code to do achieve that. For good measure I've also included some code to spin the camera's lens and also you can now move the camera up and down on the Y axis. So basically it now does everything anybody could ever ask for in an isometric style game.
I've also significantly expanded the rem statements - I hope that will be helpful.
I'll put the code into the codebase as well.
Two remaining issues:
1. the first time you use the pitch or roll keys the camera will "jump". This is a known DBPro bug I'm afraid - first reported by Spooky. Lee says he will fix it in U6
2. if the mouse cursor is "above" the plane of the matrix then the red cube will vanish into infinity. If you want to stop this just include some if statements around the position object 2 command in the function so that object 2 will not be positioned if the X and Z values are greater than the size of the matrix (-500 to +500)
Philip
What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home