This is a part of mty race game.I want to make a box and then texture it to look like a building.I've maked this but i don't know
nothing about collisions,and i realy need somebody to help me.(yes i searched in this forum too,no effect)
Do
update matrix 1
SET OBJECT SPEED 1,100
x# = object position x(1)
z# = object position z(1)
if upkey() = 1 then accel# = 1
loop object 1
if downkey() = 1 then accel# = -2
if upkey() = 0 and downkey() = 0 then accel# = -0.7
x#=newxvalue(x#,a#,speed#) : z#=newzvalue(z#,a#,speed#)
inc speed# , accel#
if speed# > maxspeed# then speed# = maxspeed#
if downkey() = 0
if speed# < 0.0
speed# = 0.0
endif
endif
if downkey() = 1
if speed# < -5.0
speed# = -10.0
endif
endif
if leftkey()=1
if speed# > 0
a#=wrapvalue(a#-2.0)
endif
endif
if rightkey()=1
if speed# > 0
a#=wrapvalue(a#+2.0)
endif
endif
if leftkey()=1
if speed# = -10.0
a#=wrapvalue(a#-2.0)
endif
endif
if rightkey()=1
if speed# = -10.0
a#=wrapvalue(a#+2.0)
endif
endif
y#=get ground height(1,x#,z#)+(object size y(1))/2
position object 1,x#,y#,z#
yrotate object 1,wrapvalue(a#+180)
ca#=wrapvalue(curveangle(a#,ca#,10.0))
cx#=newxvalue(x#,ca#,-500)
cz#=newzvalue(z#,ca#,-500)
cy#=y#+200
position camera cx#,cy#+10,cz#
yrotate camera wrapvalue(ca#)
point camera x#,y#,z#
set camera range 50,1000000000
Sync
Loop