Hi have create a map with a jeep as the player. However i cannot get it to collide with any objects or stop it going off the map.
The collisions i used for my jeep to objects:
`detect collision
if object collision(1,0)>0 then position object 1,X#,0,Z#
To stop the object going past the matrix:
do
gosub Checkmove
if upkey()=1 then x#=newxvalue(x#,angle#,-5.0) : z#=newzvalue(z#,angle#,-5.0)
if downkey()=1 then x#=newxvalue(x#,angle#,2.3) : z#=newzvalue(z#,angle#,2.3)
if leftkey()=1 then angle#=wrapvalue(angle#-4.5)
if rightkey()=1 then angle#=wrapvalue(angle#+4.5)
Checkmove:
if newxvalue > 0 and newxvalue < SIZ_TERRAIN and newzvalue > 0 and newzvalue < SIZ_TERRAIN
x# = newxvalue
z# = newzvalue
endif
return
Please can some one help me a.s.a.p. Thanks Dan.
Parton