Collision detection takes place after exitFrame and before the frame is
redrawn. This means that Director can resolve any collisions, and thus place
models in their impact positions before the scene is refreshed . Here is the
* Collision detection takes place here
You can use 'go frame x' navigation in a stepFrame handler, but you cannot use
it in a prepareFrame handler. This is because the prepareFrame handler is
triggered by a jump to a new frame. If it could also trigger a jump then you
could get caught in an endless loop.
The handler registered for collisions (either by the setCollisionCallback()
method for a given model or by the registerForEvent() method for a Shockwave3D
member) behaves like the prepareFrame handler: you can't use it for navigation.
Presumably this is because navigating to another frame would trigger the
collision callbacks all over again.
The workaround is to use the stepFrame handler to perform any necessary
on mCollisionCallback(me, aCollisionData)
??-- do any collision stuff
pFrame = marker(1) -- the next marker
You can find a demonstration movie with a more comprehensive approach at: