I was trying to make a little city made up of buildings, a penguin model, and a car. The person you control is supposed to be the penguin, and the penguin is supposed to drive the car. Then the penguin and the car are supposed to hit the building and stop instead of going through it. Did I mention they are all on a matrix. Everything runs fine. I just have one problem, I can't control the penguin nor make the camera follow the penguin. Here is the source code. Included.
rem turn sync on
sync on
rem set sync rate
sync rate 30
rem Load all the 3d objects
load object "car1.x",1
load object "penguin.x",2
load object "build1.3DS",3
make matrix 1,2000,2000,50,50
rem load all the bmps to texture the objects with
load image "car1.bmp",1
load image "pengbody.bmp",2
load image "PENGLEG.BMP",3
load image "penguineye.bmp",4
load image "rock1.bmp",5
load image "street.bmp",6
rem texture objects
prepare matrix texture 1,6,2,2
for f = 0 to 19
for g = 0 to 19
` for e = 0 to 5
set matrix tile 1,f,g,1
next e
` next g
next f
texture object 1,1
texture object 2,2
texture object 2,3
texture object 2,4
texture object 3,5
x=0
y=5
z=0
position camera x,y,z
x=camera position x()
y=camera position y()
z=camera position z()
set
position object 1,x-1,y,z-1
position object 3,150,0,150
point object 1,1,0,-50
do
if caY# > 350 then caY# = 0
if caY < 10 then caY#=350
caY#=Camera angle y()
if leftkey()=1
yrotate Camera Wrapvalue(caY#-5)
endif
if rightkey()=1
yrotate Camera Wrapvalue(caY#+5)
endif
if upkey()=1
move Camera x+5
move object 1,+5
endif
if downkey()=1
move camera x-5
move object 1,-5
endif
sync
Loop
Thanks in advanced!
------------------------
Visit my website of Games!
http://dabip.t35.com