The collision doesn't work with my 4 method, but it works on a blank project, can you help me ? This is the codes :
Works :
make object cube 1,10
make mesh from object 1, 1
add limb 1, 1, 1 : link limb 1,0,1
do
control camera using arrowkeys 0,0.1,0.1
if mouseclick()=1
if object exist(132)=0
make object cube 132, 1
position object 132, camera position x(), camera position y(), camera position z()
xrotate object 132, camera angle x() : yrotate object 132, camera angle y()
make mesh from object 132, 132
add limb 132, 1, 132 : link limb 132,0,1
endif
move object 132, 1
endif
if object exist(132)
if limb collision(1,1,132,1)=1 then print "OK" : delete object 132
`if limb hit(1,1,132,7)=1 then print "OK" : delete object 132
endif
loop
Doesn't works :
if mouseclick()=1 then Dismember=1
if Dismember=1
if object exist(132)=0
make object cube 132, 1
position object 132, camera position x(), camera position y(), camera position z()
xrotate object 132, camera angle x() : yrotate object 132, camera angle y()
make mesh from object 132, 132
add limb 132, 1, 132 : link limb 132,0,1
make object cube 133, 5
set object collision on 132
set object collision on 133
position object 133, limb position x(obj, entityprofile(entid).headlimb), limb position y(obj, entityprofile(entid).headlimb), limb position z(obj, entityprofile(entid).headlimb)
endif
move object 132, 1
if object exist(132)=1
`Méthode 1
if limb collision(obj, entityprofile(entid).headlimb, 132, 1)=1
scale limb obj, entityprofile(entid).headlimb, 0, 0, 0
delete object 132
Dismember=0
endif
`Méthode 2
if object position x(132)=limb position x(obj, entityprofile(entid).headlimb) and object position y(132)=limb position y(obj, entityprofile(entid).headlimb) and object position z(132)=limb position z(obj, entityprofile(entid).headlimb)
scale limb obj, entityprofile(entid).headlimb, 0, 0, 0
delete object 132
Dismember=0
endif
`Méthode 3
if object collision(132,133)=1 then delete object 133 : delete object 132 : scale limb obj, entityprofile(entid).headlimb : dismember=0
`Méthode 4
DismDist#=intersect object(132, object position x(132), object position y(132), object position z(132), object position x(133), object position y(133), object position z(133))
if DismDist# = 0 then scale limb obj, entityprofile(entid).headlimb, 0, 0, 0 : delete object 133 : delete object 132 : dismember=0
endif
endif
Eternal suffering ...
I'm french