I have a car as object 10, and my terrain created in 3DS Max is object 1001. When I run the proggy, I see my car and I see my land, however it will not move forward. When I turn off collision it will, my car will then move but through the rolling hills.
How do I get in to stay on top pf terrain and climb and go down the hills like a car in rough terrain should??!
my code;
SET DISPLAY MODE 1024, 768, 16
sync rate 60 : hide mouse
SET TEXT SIZE 20
Fog on
Fog distance 2000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)
load object "./objects/car.x",10
position object 10,950,0,900
load object "./objects/terrain.x",1001
position object 1001,750,320,0
Rem Main loop
Do
Rem Store Object angle Y in aY#
aY# = Object angle Y(10)
Rem Control input for camera
If Upkey()=1 then Move object 10,10
If Leftkey()=1 then Yrotate object 10,Wrapvalue(aY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(aY#+5)
Rem Detect collision
If Object collision(10,1001) then position object 10,X#,0,Z#
Rem get player object position and store in X# and Z#
X# = Object position x(10)
Z# = Object position z(10)
Rem get new camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
Rem position camera
Position Camera cX#,45,cZ#
Rem point the camera at the player object
Point camera X#,25,Z#+20
score=score+1
rem score tracker
set cursor 50,20
print "score: ",score
set cursor 50,40
print "speed: ",Speed
set cursor 50,60
print "Frames Per Second: ",SCREEN FPS()
rem
Rem Refresh Screen
Sync
Loop
thnax in advance for you expertise and help!
cypher