Posted: 22nd Feb 2004 14:45
The attached code came out of the following thread:

http://darkbasicpro.thegamecreators.com/?m=forum_view&t=25644&b=7

Its code produced by Final Epsilon and myself. Basically its code which makes a turret object (a cube in this case) point at another object (a sphere in this case). The spherical aiming object can be moved by the mouse and keyboard.

The code also contains Final Epsilon's rather good 3d camera scrolling routine using a 3d spherical coordinate system.

Philip
Posted: 24th Feb 2004 23:30
doesn't work!
Posted: 25th Feb 2004 14:24
I've just tried the code again and it works perfectly.

Its DBPro code so if you are using DBC thats your problem.

Philip
Posted: 1st Mar 2004 8:32
It doesnt work in dbpro either, comes up with the following error:

Could not determine parameter type of 'pick object(mousex(), mousey(), 2, 2)' at line 137
Posted: 1st Mar 2004 14:07
I've just cut and pasted the code attached to my first post into RobK's Blue IDE and compiled it. It ran fine - no problems whatsoever. I've tried compiling it at different screen resolutions. It still ran fine. I've also tried compiling it in the original IDE. It ran fine in that as well.

The problem is at your end I'm afraid. Are you running at least DBP update 5.1 and do you have all the latest drivers installed? You need to be running at least u5.1 as the pick object command was, I think, first introduced in that update.

Philip