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 / very annoying camera problem

Author
Message
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 21st Jul 2003 20:47
loook at this code

randomize timer()

sync on
sync rate 60
make camera 2

set camera view 0,0,0,320,480
set camera view 2,320,0,640,480
color backdrop RGB(0,0,255)
make object triangle 20,-0.5,-0.5,0,0.5,-0.5,0,0,1,0
set object collision to polygons 20
set ambient light 100
shld = 3


set object wireframe 20,1
rem color object 20,RGB(0,255,0)

for t = 1 to 19
make object cube t,0.1
rem color object t,RGB(255,0,0)

next t
for t=21 to 60
make object cylinder t,0.7

rem color object t,RGB(128,64,0)
set object wireframe t,1
next t
dim aster(40)
dim blttime(19)
nas = 4

for t = 1 to nas
aster(t) = 3
yrotate object (t+20),rnd(360)
move object (t+20),rnd(13)+7
next t
position camera 0,0,30,0
xrotate camera 0,90
xrotate object 20,90
position camera 2,0,30,0
xrotate camera 2,90

do
ang# = ang# - (leftkey()-rightkey()) * 4
yrotate object 20,ang#
if upkey() = 1
xs# = xs# + (sin(ang#)/300)
zs# = zs# + (cos(ang#)/300)
endif
x# = x# + xs#
z# = z# + zs#
position object 20,x#,0,z#

if z# > 19 then z# = -19
if z# 25 then x# = -25
if x# 20
if object position z(t) > 19
position object t,object position x(t),0,-19
endif
if object position z(t) 25
position object t,-25,0,object position z(t)
endif
if object position x(t) 0.3 then xs# = 0.3
if zs# > 0.3 then zs# = 0.3
if xs# 0
move object t,0.3
blttime(t) = blttime(t) - 1
endif

if blttime(t) = 0
hide object t
endif
next t

for t = 1 to 40
if aster(t) > 0
show object t+20
move object t+20,0.2
if sqrt((object position x(t+20)-x#)^2+(object position z(t+20) - z#)^2) 0 and blttime(t) > 0
if sqrt((object position x(t)-object position x(n+20))^2+(object position z(t) - object position z(n+20))^2)
Life is a terminal disease.
You never survive it.
Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 21st Jul 2003 22:24
hmm, you should try to post again

"He will come...the voice from the outer world,
bringing the holy war, the Jihad, which will cleanse the Universe and bring us out of darkness."
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 21st Jul 2003 22:53
The camera images are squashed, but i want parts of them cut off
how do u do that?

Life is a terminal disease.
You never survive it.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st Jul 2003 23:24
Paste the image to a bitmap, cut it, then repaste it on the screen. Alternatively, play around with the camera FOV.

Login to post a reply

Server time is: 2026-07-21 12:50:21
Your offset time is: 2026-07-21 12:50:21