@ GALACTUS: Well, my game is far too big to post it here and it's a big mess of comments etc. (I'm always happy when I understand what I did once upon a time), so I just took the "Selfmade-CCD-Code" for my "bar", cause it's the smallest piece (and maybe understandable):
set vector3 speedVec, PHY GET RIGID BODY LINEAR VELOCITY X(kugel), PHY GET RIGID BODY LINEAR VELOCITY Y(kugel), PHY GET RIGID BODY LINEAR VELOCITY Z(kugel)
speed# = LENGTH VECTOR3(speedVec)
if SC_objectCollision (kugel, balkenTunnelingSensor)
if (object position z (kugel) < object position z (balken))
alte_X_Pos# = OBJECT POSITION X(kugel)
alte_Y_Pos# = OBJECT POSITION Y(kugel)
``alte_Z_Pos# = OBJECT POSITION Z(kugel)
Kugel_Reset(alte_X_Pos#, alte_Y_Pos#, object position z (balken)+(balkenDicke#/2)-tunnelingResetWert#)
``PHY SET RIGID BODY LINEAR VELOCITY kugel, x vector3 (speedVec), y vector3 (speedVec), z vector3 (speedVec)
alte_Y_Pos# = 0
alte_Z_Pos# = 0
`` print "Tunneling-Sensor aktiv"
endif
endif
Function Kugel_Reset(ku_x_Pos, ku_y_Pos, ku_z_Pos)
if phy get rigid body exist (kugel) = 1 then phy delete rigid body kugel
position object kugel, ku_x_Pos, ku_y_Pos, ku_z_Pos
phy make rigid body dynamic sphere kugel, 3
phy set rigid body gravity kugel, kugelGravitation#
phy set rigid body mass kugel, kugelMasse#
``phy set rigid body ccd kugel, 1 ``geht nicht, unbekannter Befehl! Spätere Version
``phy set rigid body continuous cd OBJECTID, 1 ``geht nicht, unbekannter Befehl! Spätere Version
phy set rigid body ccd motion threshold kugel, 0
phy set rigid body group kugel,kugelGrp
``print "Kugel Reset!"
Endfunction
Sorry, if this is messed up with german words, but I use them a lot when I program!
What the code does:
I have a hidden box called "balkenTunnelingSensor" (=barTunnelingSensor) and it's placed behind the bar (towards the user) in my game. Cause my bar is very tall and the ball gets very fast sometimes, this collision-sensor detects, if the ball is behind the bar (this normaly only happens when the ball was too fast and run through the bar without causeing a DP-collision). So when the ball is behind the bar it saves the old x-y-positions of the ball and rests the ball to a z-value calculated that lies before the bar and is just touching /intersecting it a bit, so DP knows that it's a collision and the ball bounces off (as if nothing happend)! (Note: In this example I deactivated the applying of the force that was saved before the ball was reset! It was causing problems (or what ever was the reason I deactivated it), but I used it with my arena-walls!)
I also added the "ball-reset-function", so you know what I mean with "reset"!
As you see, I also had the DP-CCD-commands within my code, but they did not work for me! If you look into the documentation/help that comes with DP, there is a nice pic that shows how the CCD should work and that was the place where I got my idea for my own "simple-fake-CCD"!
This method is usefull for very simple things, BUT not for complex objects!
If you don't know what I was talking about when I said "my game/ball/bar" then have a look at the link in my sig!
Maybe that helps you (I hope so), maybe not (if so, I'm sorry)!
Hoozer