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.

DarkBASIC Professional Discussion / GRavity and Skybox prob

Author
Message
DLC
15
Years of Service
User Offline
Joined: 12th Sep 2010
Location: Jupiter
Posted: 12th Sep 2010 18:59
hey people,
i recently got dbpro,and i emerced my self in the 3d aspects of coding almost immediately,i figured out some of the coding thingys, and i was able load in a terrain .x file that i made from L3DT, i also got my hands on a skybox.now, here's the problem,
HOW DO I STOP MY BOX from floating
the skybox seems to disappear,even though its cull is set to 0.
someone help me solve this please,
it might be simple to you but am still a noob :p

autocam on
backdrop off
set window position 0,0

set display mode 860,600,0
make matrix 1,1000,1000,50,50
make object cube 1,4
position object 1,0,-30,0

load object "cloudcube.x",4
scale object 4,50000,50000,50000
position object 4,0,-40,0
set object light 4,0 : set object texture 4,2,0
set object cull 4,0

load object "tres.x",3
load image "tres_TX.jpg",1
xrotate object 3,90
scale object 3,40,40,40
position object 3,0,-30,0
texture object 3,1
set object cull 3,0
set camera to object orientation 1
automatic object collision 1,0,0
set object collision to spheres 1
do
text 10,10,str$(screen fps())
If Upkey()=1
Move Object 1,0.8
endif
If Downkey()=1
Move Object 1,-0.8
endif
If Leftkey()=1
Dec a#,0.9
endif
If Rightkey()=1
Inc a#,0.9
endif
yrotate object 1,a#


posx#=cos(270-a#) * 30 + object position x(1)
posz#=sin(270-a#) * 30 + object position z(1)
Position Camera posx#,object position y(1)+1,posz#
Point Camera object position x(1),object position y(1)+1,object position z(1)
sync
loop
end

dmann
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Sep 2010 17:24
Hmm, not sure what you mean. Do you mean the sky box disappears dependent on where you are looking at it from? Try increasing your camera range higher.

http://s6.bitefight.org/c.php?uid=103081
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 13th Sep 2010 18:09
Yeah, I'm with DVader, Either increase the cameras range, or alternatively, scale down the size of the sky box.

DLC
15
Years of Service
User Offline
Joined: 12th Sep 2010
Location: Jupiter
Posted: 15th Sep 2010 21:39
yes dvader, the skybox disappears when i view the opposite side from the another side.
How do i increase the camera range?

Also,I just noticed that my skybox disappears completely when i scale it above 30000 i.e
scale object objno,30000,30000,30000.

Can someone help me please, this problem is really starting to fustrate me!

dman
gbark
20
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 16th Sep 2010 06:32
Use the set camera range command to specify a maximum distance to draw objects. Play around with the value until you get one that allows you see the whole skybox.
DLC
15
Years of Service
User Offline
Joined: 12th Sep 2010
Location: Jupiter
Posted: 17th Sep 2010 03:00
thanks!

dman

Login to post a reply

Server time is: 2026-07-22 11:01:51
Your offset time is: 2026-07-22 11:01:51