CodeBase - Position object on the X/Z plane at position represented by mouse cursor with ability to move camera in every direction

Return to the CodeBase listing

Category: 3D Maths

Version: 1.0

0
0

Information

Uploaded: 10th Mar 2004 09:42

Modified: 1st Jan 1970 01:00

Author:  Philip

Summary

See the long description below.

Full Description

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&amp;t=27469&amp;b=6 and http://darkbasicpro.thegamecreators.com/?m=forum_view&amp;t=27455&amp;b=7<br /> <br /> 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.<br /> <br /> I'll put the code into the codebase as well. <br /> <br /> Two remaining issues: <br /> <br /> 1. the first time you use the pitch or roll keys the camera will &quot;jump&quot;. This is a known DBPro bug I'm afraid - first reported by Spooky. Lee says he will fix it in U6<br /> <br /> 2. if the mouse cursor is &quot;above&quot; 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)<br /> <br /> Philip

Comments

No comments yet.