I have a problem with this when also using WakeupOnElapsedFrames.
The code I am using is like this:
public void initialize() {
wakeupEvents = new WakeupCriterion[3];
wakeupEvents[0] = new WakeupOnElapsedFrames(1);
wakeupEvents[1] = new WakeupOnCollisionEntry(shape);
wakeupEvents[2] = new WakeupOnCollisionMovement(shape);
wakeupCriterion = new WakeupOr(wakeupEvents);
wakeupOn (wakeupCriterion);
}
public void processStimulus (Enumeration criteria)
{
WakeupCriterion wakeup;
while (criteria.hasMoreElements())
{
wakeup = (WakeupCriterion) criteria.nextElement();
// Frame update
if (wakeup instanceof WakeupOnElapsedFrames) {
// Moving the object
}
// When colliding with an other object
else if (wakeup instanceof WakeupOnCollisionEntry) {
// Set different states for moving object
}
else {
// CollisionMovement...
}
}
wakeupOn (wakeupCriterion);
}
What is happening is that the object moves fine untill it enters an object
and WakeupOnCollisionEntry i triggered. After that it triggers the
WakeupOnCollisionMovement and are not doing anything else even if
there is nothing else done in the CollisionMovement part... =(
In other words the object stops! Even if the object has stopped (is not
moving) the WakeupOnCollisionMovement triggers...
Using WakeupOnElapsedTime works fine but not with WakeupOnElapsedFrames...
Why??
Please help me...
.--------------------------.
M. Andersson ///
[EMAIL PROTECTED] ///
www.acc.umu.se/~menthos/ \\\///
hem.passagen.se/menthos/ \XX/
'--------------------------'
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".