Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
MrSteve
21
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Omnipresent
Posted: 18th May 2010 23:41 Edited at: 19th May 2010 00:03
Hey Guys, can any of you tell me why my sliding collision is not working, I pretty mch copied it from another program of mine but it just wont move!
please help!
sync rate 60
set display mode 1280,1024,32
load object "house1/house1.3ds",2:load object "house1/house1col.3ds",1
position object 2,200,0,200:position object 1,200,0,200:make object collision box 1,0,0,0,140,140,80,0


make object cube 3,20:make object collision box 3,10,10,10,10,10,10,0
coll=0


ox=object position x(3)
oz=object position z(3)
do

set cursor 0,0
print coll
set cursor 0,10
print object collision (3,1)
set cursor 0,20
print ox
set cursor 0,30
print oz


if upkey()=1 then move object 3,2
if downkey()=1 then move object 3,-2
if leftkey()=1 then yrotate object 3,object angle y(3)-1
if rightkey()=1 then yrotate object 3,object angle y(3)+1



if object collision (1,3)>0
dec ox, get object collision x()
dec oz, get object collision z()
coll=1
else
coll=0
endif
position object 3,ox,object position y(3),oz


set camera to follow object position x(3),object position y(3),object position z(3),object angle y(3),30,20,10,1
sync
loop

A bump on the head........ is worth two in a bush?

Login to post a reply

Server time is: 2026-07-25 16:20:09
Your offset time is: 2026-07-25 16:20:09