Kjell wrote:Hi Francesco,
What exactly is the problem here? The fact that the documentation does not clearly state that OnStop still triggers OnCollision Events in Models as well?
Yes it is

so I will modify the wiki now (even if Ville was not yet informed

)
Kjell wrote:Since there's only one moving Model that interacts with the rest, let the Models that should be hit check whether they have been hit or not using a ZExpression, and handle the correct bouncing behavior from there.
Actually I don't see any difference, mainly because I just use the OnCollision event on the block, handling the bouncing from there; so it is almost the same thing using ZExpressions inside a OnCollision or inside a OnUpdate component.
Better, the OnCollision component checks collision using compiled code, so it *should* also be faster.
The advantage using the "Stop" action is that the LastPosition of the ball is saved in an internal variable so everything is moved out of the collision properly in an automated way. I can make this in ZExpressions, of course. But now the discussion can be shifted to: "what kind of behaviour should be added to the "action" property?"
I propose: Collision, Stop (the actual one but renamed something like Stop&Collision), Stop&NoCollision, Collision&MoveOut. Plus, something like "undefine collision" should also be present IMHO. Something similar is already present in Collision.pas, line 164. but this function is never used.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-