Hi I am probably doing this all wrong but basically I have a rotating cube in front of a backdrop and a Particle Emitter between the two
The idea being that I can create a Star Field effect by using the emitter command and have a rotating cube in the foreground
The only trouble is that I can't figure out how to get the particles to appear behind the cube.
They always seem to appear in front no matter what I do.
Anyway here is the code
Any ideas how to make the star field appear behind the object please?
Rem Project: Dark Basic Pro Project
Rem Created: Monday, November 07, 2011
Rem ***** Main Source File *****
cls
set display mode 1024,768,32
set window on
SET WINDOW POSITION 100,100
SET NORMALIZATION ON
set ambient light 60
hide light 0
sync on
SYNC RATE 60
load sound "media\locutus_borg.wav",1
load music "media\the thing.mp3",1
load image "media\borg-cube.png",1
load image "media\Earth galaxy.png",2
load image "media\bluedust.png",3
play music 1
make object cube 1,30
MAKE OBJECT PLANE 2, 2000,2000
make light 1
make camera 1
make particles 1, 3, 3, 5
position object 1,0,0,z#
position object 2,0,0,1000
position particles 1,0,0,-100
position light 1,0.67,-0.76,-210
position camera 1,0,0,-200
texture object 1,1
texture object 2,2
color light 1,256,256,512
set light range 1,1000
set particle gravity 1,0
set particle floor 1,0
ghost particles on 1,5
ROTATE PARTICLES 1, -90, 0, 0
SET PARTICLE EMISSIONS 1,1
SET PARTICLE LIFE 1,300
do
sync
gosub checkforPbutton
gosub rotatecube
gosub movecube
loop
checkforPbutton:
if (scancode())=25 then play sound 1
return
rotatecube:
yrotate object 1,x*0.25
inc x
return
movecube:
position object 1,0,0,z#
dec z#,0.1
if z#=< -150.00 then z#=-150.00
return
"There are no perfect ideas only perfect intentions"