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.

Code Snippets / 3d camera scrolling and turret pointing

Author
Message
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 22nd Feb 2004 14:45 Edited at: 22nd Feb 2004 14:46
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

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
Big Al
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: infront of the PC
Posted: 24th Feb 2004 23:30
doesn't work!

If quizes are quizical then what are tests?
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
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

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
Styles
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location: New Zealand
Posted: 1st Mar 2004 08: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
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
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

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home

Login to post a reply

Server time is: 2024-11-23 21:53:13
Your offset time is: 2024-11-23 21:53:13