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 / A problem with set object to camera orientation

Author
Message
ash231
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location:
Posted: 21st Mar 2004 14:57
Anyway, just a quick question you may be able to help me with - You know how in just about every space sim the developers put in that debris effect to simulate motion/speed.. well in the old DB this piece of code worked fine...

rem flying debris effect settings
load_flying_debris:
load image "grey.bmp",50000
for t=50000 to 50020
make object box t,0.1,0.1,1
texture object t,50000
ghost object on t
set object collision off t
next t
return
rem flying debris effect
fly_debris:
for t=50000 to 50020
if object in screen(t)=0
position object t,camx,camy,camz : set object to camera orientation t
pitch object up t,rnd(3)+1 : pitch object down t,rnd(3)+1 : turn object left t,rnd(3)+1 : turn object right t,rnd(3)+1
move object t,rnd(1000)+100
endif

remstart
if velocity<1
hide object t
else
show object t
endif
remend
next t
return

Everytime you turned, no matter what your angle the debris would appear in front of you as you flew forward.. but in DBPro (i have the latest everything) you fly forward (default angle when you test the game) and it works fine.. but soon as you turn to go somewhere else.. nothing.. but if you go back to the default course you were flying before the debris will still be there.. reappearing as it should.. but not infront of you! hmmm also theres seems to be problems with having objects orientate objects... they get all "jerky".. however use the same piece of code in old DB and it works perfectly. By the way there are no old irrelevant commands from the old DB that i'm using in the new one... so its not that.. it just seems to me like the engine is different.. or i'm missing something. Any ideas? I tried doing this same thing another way.. works ok.. but this method seems to be the best.

Ummm.. die?
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 21st Mar 2004 17:18
I tend to advise people to avoid the "set object to camera orientation" and "set camera to object orientation" commands. There are known bugs with them.

The workaround uses the set object to object orientation command and works fine. Do a search on these forums and you'll find it.

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-09-22 03:05:18
Your offset time is: 2024-09-22 03:05:18