Hi! My question:
- I have this matrix, walls and objects!
I want the cube to go near the sphere, but without going trough the walls!
sync on
sync rate 0
make matrix 1,1000,1000,10,10
position camera -250,750,250
point camera 500,0,500
autocam off
set global collision on
dim data#(5)
p_parede(1,2,5,"h")
p_parede(2,3,5,"h")
p_parede(3,4,5,"h")
p_parede(4,5,5,"h")
p_parede(5,2,4,"v")
p_parede(6,2,3,"v")
p_parede(7,6,4,"v")
make object sphere 100,20
color object 100,rgb(255,0,0)
position object 100,50,10,50
make object cube 101,20
color object 101,rgb(0,255,0)
position object 101,350,10,550
do
sync
loop
function p_parede(onum,x,z,hv$)
make object box onum,100,40,1
if hv$="h"
yrotate object onum,0
position object onum,x*100+50,20,z*100
endif
if hv$="v"
yrotate object onum,90
position object onum,x*100,20,z*100+50
endif
endfunction
How can I do it?