The pushRigidbody use AWPGeneric6DofConstraint just moving a few times, and will stay stopping always.
generic6Dof = new AWPGeneric6DofConstraint(wallRigidbody, new Vector3D( 0, 0, -2800), new Vector3D(), _pushRigidbody, new Vector3D(0, 0,-2000), new Vector3D());
generic6Dof.setLinearLimit(new Vector3D(0, 0, 0), new Vector3D(0, 0, 2600));
generic6Dof.setAngularLimit(new Vector3D(0, 0, 0), new Vector3D(0, 0, 0));
generic6Dof.getTranslationalLimitMotor().enableMotorZ = true;
generic6Dof.getTranslationalLimitMotor().targetVelocity = new Vector3D(0, 0, 30);
generic6Dof.getTranslationalLimitMotor().maxMotorForce = new Vector3D(0, 0, 30000);
_physicsWorld.addConstraint(generic6Dof, true);
var timer : Timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
private function onTimer(e : TimerEvent) : void
{
var vec : Number = generic6Dof.getTranslationalLimitMotor().targetVelocity.z;
generic6Dof.getTranslationalLimitMotor().targetVelocity = new Vector3D(0, 0, -vec);
}
The below issue was happen when I public this project to mobile devices.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at adobe.abc.GlobalOptimizer.createBlock(GlobalOptimizer.java:9949)
(The attachment source code)