http://www.blitzbasic.com/Community/posts.php?topic=34953
; If the entity collided with the level, make it bounce.
If Entity_Hit > 0
; Calculate bounce:
; Get the normal of the surface which the entity collided with.
Nx# = CollisionNX(ballpos, 1)
Ny# = CollisionNY(ballpos, 1)
Nz# = CollisionNZ(ballpos, 1)
; Compute the dot product of the entity's motion vector and the normal of the surface collided with.
VdotN# = Vx#*Nx# + Vy#*Ny# + Vz#*Nz#
; Calculate the normal force.
NFx# = -2.0 * Nx# * VdotN#
NFy# = -2.0 * Ny# * VdotN#
NFz# = -2.0 * Nz# * VdotN#
; Add the normal force to the direction vector.
Vx# = Vx# + NFx#
Vy# = Vy# + NFy#
Vz# = Vz# + NFz#
This might help a little
; If the entity collided with the level, make it bounce.
If Entity_Hit > 0
; Calculate bounce:
; Get the normal of the surface which the entity collided with.
Nx# = CollisionNX(ballpos, 1)
Ny# = CollisionNY(ballpos, 1)
Nz# = CollisionNZ(ballpos, 1)
; Compute the dot product of the entity's motion vector and the normal of the surface collided with.
VdotN# = Vx#*Nx# + Vy#*Ny# + Vz#*Nz#
; Calculate the normal force.
NFx# = -2.0 * Nx# * VdotN#
NFy# = -2.0 * Ny# * VdotN#
NFz# = -2.0 * Nz# * VdotN#
; Add the normal force to the direction vector.
Vx# = Vx# + NFx#
Vy# = Vy# + NFy#
Vz# = Vz# + NFz#
This might help a little