Hi all!
I've tried to use this dll for the first time. But when my object collides with the map, it happens something very strange: everything becomes white, and I can't understand exactly what happens.
Here's the code snippet of my source code:
sync on : sync rate 0
backdrop on : color backdrop rgb(255,255,255)
make memblock 1,1
load object "Maps\egypt1.dbo",1
sc_setupobject 1,0,0
make object cube 2,2 : position object 2,10,50,10
sc_setupobject 2,0,0
position camera camera position x(),camera position y()+50,camera position z()
do
set camera to follow object position x(2),object position y(2),object position z(2),object angle y(2),12,6,1,1
ox#=object position x(2)
oy#=object position y(2)
oz#=object position z(2)
if upkey()
move object 2,2
endif
if leftkey()
rotate object 2,object angle x(2),object angle y(2)-3,object angle z(2)
endif
if rightkey()
rotate object 2,object angle x(2),object angle y(2)+3,object angle z(2)
endif
if downkey()
move object 2,-2
endif
x#=object position x(2)
y#=object position y(2)
z#=object position z(2)
slidingcollision(ox#,oy#,oz#,x#,y#,z#,1,2,1)
sync
loop
function slidingcollision(x1#,y1#,z1#,x2#,y2#,z2#,radius,dyn,obj)
c=sc_sphereslide(obj,x1#,y1#,z1#,x2#,y2#,z2#,radius,0)
if c>0
cx#=sc_getcollisionslidex()
cy#=sc_getcollisionslidex()
cz#=sc_getcollisionslidex()
position object dyn,cx#,cy#,cz#
endif
endfunction
I also post all my project.
Thanks in advice to help me
2D game programmer! ^__^