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.

Newcomers DBPro Corner / Need Help!

Author
Message
Bond 007
19
Years of Service
User Offline
Joined: 16th Jul 2005
Location:
Posted: 21st Jul 2005 13:50
i'am trying to make a racing game ... for checking purposes of camera angles i created a little sphere in truespace 3.2 and then used it as an object in dark basic ... but the sphere becomess tooo small in it.. i goes with the camera but is tooo far and tiny.. here are the codes:
rem Make a simple scene for the camera to look at
make matrix 1,10000.0,10000.0,25,25
load bitmap "c:\floor1.bmp",1
get image 1,0,0,256,256
delete bitmap 1
prepare matrix texture 1,1,2,2
randomize matrix 1,50.0
set matrix height 1,12,12,300.0
update matrix 1

rem Create sphere character to follow
load object "c:\kool.x",1

rem Set variables for character position
x#=500
z#=500

rem Activate manual sync
sync on

rem Begin loop
do

rem Control camera with arrow keys
if upkey()=1 then x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if downkey()=1 then x#=newxvalue(x#,a#,-10) : z#=newzvalue(z#,a#,-10)
if leftkey()=1 then a#=wrapvalue(a#-10.0)
if rightkey()=1 then a#=wrapvalue(a#+10.0)

rem Update character
y#=get ground height(1,x#,z#)+50.0
position object 1,x#,y#,z#
yrotate object 1,a#

rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+180),300)
cz#=newzvalue(z#,wrapvalue(a#+180),300)
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#,cz#

rem Point camera at object
point camera x#,y#,z#

rem Syncronise
sync

rem End loop
loop
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 23rd Jul 2005 16:33 Edited at: 26th Jul 2005 05:48
Ok.. many people have this problem, guy..

Caligari's tools export objects in their own measure units..
Be careful when you configure the exporting settings..
I think that in Caligari TrueSpace 3.2 this option is already available.. Change the unit into something like meters, kilometers or whatever other greater values..

Or try just to superScale up the objects in the editor before exporting.. RightClick on the white arrow button (in gameSpace it is on the bottom right of the screen) and change proportionately the _x,_y and _z scales... Then export..

Or make this "scale object 1, 5000,5000,5000"

scale object [object number], [_x%],[_y%],[_z%]

Good luck

The worst foe lies within the self...
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 24th Jul 2005 14:08
Also make sure the object is positioned at coordinates 0,0,0 in TruSpace before exporting, else it will be positioned in the 3D World where it is positioned in TruSpace.


Available at THE BOTTOM OF EVERY DARKBASIC PAGE!!!!!!

Login to post a reply

Server time is: 2024-09-23 23:23:39
Your offset time is: 2024-09-23 23:23:39