Take a look at this vid. It shows the ball colliding with the hoarding and it gets stuck...
http://download.newstargames.com/misc/NSS4/CollisionProb1.avi
This example show the ball colliding with the rear of the hoarding and it rebounds in the wrong direction...
http://download.newstargames.com/misc/NSS4/CollisionProb3.avi
However, as you can see, if the ball bounces off the stadium wall it responds fine. This is also the case if I align the advert hoardings perfectly horizontal or verticle which makes me think it is a bug in minib3d.
This is the code i'm using...
Any idea?
http://download.newstargames.com/misc/NSS4/CollisionProb1.avi
This example show the ball colliding with the rear of the hoarding and it rebounds in the wrong direction...
http://download.newstargames.com/misc/NSS4/CollisionProb3.avi
However, as you can see, if the ball bounces off the stadium wall it responds fine. This is also the case if I align the advert hoardings perfectly horizontal or verticle which makes me think it is a bug in minib3d.
This is the code i'm using...
Collisions(CTYPE_BALL, CTYPE_GOALNET, 2, 1) Collisions(CTYPE_BALL, CTYPE_GOALPOST, 2, 1) Collisions(CTYPE_BALL, CTYPE_WALL, 2, 1) Collisions(CTYPE_BALL, CTYPE_STADIUM, 2, 1) ' Hoardings use this.
For Local i:Int = 1 To CountCollisions(mesh) Local ent:TEntity = CollisionEntity(mesh, i) Local Nx# = CollisionNX(mesh, 1) Local Ny# = CollisionNY(mesh, 1) Local Nz# = CollisionNZ(mesh, 1) Local VdotN# = vecVelocity.x*Nx# + vecVelocity.y*Ny# + vecVelocity.z*Nz# Local NFx# = -2.0 * Nx# * VdotN# Local NFy# = -2.0 * Ny# * VdotN# Local NFz# = -2.0 * Nz# * VdotN# Local bounce:Float = 0.8 vecVelocity.x = (vecVelocity.x + NFx#) * bounce vecVelocity.y = (vecVelocity.y + NFy#) * bounce vecVelocity.z = (vecVelocity.z + NFz#) * bounce Next
Any idea?