dbPhyGetCollisionNormalForce doesn't work...
I save the position of my objects each loop to get their velocity:
Do this at the end of each loop...
`set up the Blok array
type typeB
X as float
Y as float
Z as float
endtype
Dim Blok(4999) as typeB
_GET_BLOK_POS:
for b=StartObj to 4999
if object exist(b)=1
Blok(b).X=object position x(b)
Blok(b).Y=object position y(b)
Blok(b).Z=object position z(b)
endif
next b
RETURN
and this when you "get collision data"...
while phy get collision data()
object_a = phy get collision object a()
object_b = phy get collision object b()
if object_a>=StartObj and object_a<5000
`get velocity before collision
vx#=Blok(object_a).X-object position x(object_a)
vy#=Blok(object_a).Y-object position y(object_a)
vz#=Blok(object_a).Z-object position z(object_a)
V#=(SQRT(vx#^2+vy#^2+vz#^2))*100
if V#>100 then V#=100
if V#>1
Sound=find free sound()
clone sound Sound, 25
POSITION SOUND Sound, object position x(object_a),object position y(object_a),object position z(object_a)
set sound speed Sound, 100+RND(99900)
SET SOUND VOLUME Sound, V#
play sound Sound
endif
endif
if object_b>=StartObj and object_b<5000
`get velocity before collision
vx#=Blok(object_b).X-object position x(object_b)
vy#=Blok(object_b).Y-object position y(object_b)
vz#=Blok(object_b).Z-object position z(object_b)
V#=(SQRT(vx#^2+vy#^2+vz#^2))*100
if V#>100 then V#=100
if V#>1
Sound=find free sound()
clone sound Sound, 25
POSITION SOUND Sound, object position x(object_a),object position y(object_a),object position z(object_a)
set sound speed Sound, 100+RND(99900)
SET SOUND VOLUME Sound, V#
play sound Sound
endif
endif
endwhile
sorry if it's not very obvious but I've had a few ales...