this will work
sync on
sync rate 60
load object "U.x", 1
load object "G.x",2
position object 2,0,0,0
set object collision on 1
set object collision on 2
do
rem refresh screen
sync
rem store old positions
oldx# = object position x(1)
oldy# = object position y(1)
oldz# = object position z(1)
rem movement
If Leftkey() then Turn object left 1,1
If Rightkey() then Turn object right 1,1
If Upkey() then x#=newxvalue(x#,object angle y(1),1):z#=newzvalue(z#,object angle y(1),1)
If Downkey() then x#=newxvalue(x#,object angle y(1),-1):z#=newzvalue(z#,object angle y(1),-1)
rem reposition object
position object 1,x#,y#,z#
rem collision
if object collision(1,0)>0
x#=oldx#
y#=oldy#
z#=oldz#
endif
position object 1,x#,y#,z#
loop
cheers
please check my sig:
Do you need a complete FPS,3rdPS engine
?? Or a collision command libary?? well here it is:
http://forum.thegamecreators.com/?m=forum_view&t=38869&b=6&p=0