I compiled Steve Vink's ODE Physics tutorial and all was okay until I added a command to rotate the static floor box, now it simply does not react on collision with the floor object. Physics wrapper bug again, or is it me again, huh?
sync on: sync rate 40
` Create the ODE World
ode start
ode set world gravity 0,-20,0
ode set world step 0.05
ode set world erp (0.2)*2.5
ode set world cfm (10^-5)*2.5
` Create a static floor. Implement in Dark Basic Professional first,
` and then ask ODE to do the same...
make object box 1,200,10,200
`=============================
xrotate object 1,-45 `<=== I ADDED THIS COMMAND AND THE ENGINE STOPS DETECTING COLLISION ON IT!
`=============================
color object 1, rgb(128,255,128)
ode create static box 1
` Create 4 dynamic objects
` Implement in Dark Basic Professional first
` and then ask ODE to do the same...
make object box 2,10,5,8
make object sphere 3,12,16,16
make object cone 4, 10 : xrotate object 4, 90
make object box 5,8,0.1,10 : xrotate object 5, 90
position object 2, -5,20,0
position object 3, 3,40,3
position object 4, 0,60,-3
position object 5, 0,80,5
ode create dynamic box 2
ode create dynamic sphere 3
ode create dynamic triangle mesh 4
ode create dynamic box 5
` continued…
` Add friction to our objects
ode set contact fdir1 1, 20.0
ode set contact fdir1 2, 20.0
ode set contact fdir1 3, 20.0
ode set contact fdir1 4, 20.0
ode set contact fdir1 5, 20.0
` Position the camera, and watch what happens...
position camera 0, 50, -40
point camera 0,20,0
while inkey$() = ""
ode update
sync
endwhile
` Tidy up...
ode end
end
What's crackin' homie?