Hello I'm not the one for not trying but I have become really confused by limbs. I know as far as the idea behind limbs, but recently I wanted to be able to tell darkbasic that when a collision is detected is to drop the limbs at leave them scattered around the scenery.
Along the lines as grand theft auto, for an example as when the vehicles hit something at least something falls off (a hood or a door)
I don't really want to use the hide limb command, but I have heard of the unglue object. But not sure how to use this command in the code
The code below is only a very rough script
Thankyou in advance
phy start
sync on
sync rate 80
`make light 1 : set directional light 1, -5, -5, 5
`position camera -20, 5, -60
`point camera 0, 10, 0
rem add object
`car
load object "G:/New folder/darkbasic/caradd/media/car1/car1.x", 1
position object 1, 0, 20, 15
phy make rigid body dynamic box 1
rem added limb
load object "G:/New folder/darkbasic/caradd/media/car1/side1.x", 3
glue object to limb 3, 1, 1, 2
rem ground
make object box 2, 50, 1, 50
position object 2, 0, -10, 0
phy make rigid body static box 2
do
while phy get collision data ( )
a = phy get collision object a ( )
b = phy get collision object b ( )
if a = 1 and b = 2
rem any detection
hide object 2
rem not sure what to add here for dropping a limb
endif
endwhile
phy update
sync
loop