Stop moving obj use AWPGeneric6DofConstraint

Software: Away3D 4.x

Shine Chen, Newbie
Posted: 07 October 2014 01:27 PM   Total Posts: 2

The pushRigidbody use AWPGeneric6DofConstraint just moving a few times, and will stay stopping always.

generic6Dof = new AWPGeneric6DofConstraint(wallRigidbody, new Vector3D00, -2800), new Vector3D(), _pushRigidbody, new Vector3D(00,-2000), new Vector3D());

generic6Dof.setLinearLimit(new Vector3D(000), new Vector3D(002600));
generic6Dof.setAngularLimit(new Vector3D(000), new Vector3D(000));
generic6Dof.getTranslationalLimitMotor().enableMotorZ true;
generic6Dof.getTranslationalLimitMotor().targetVelocity = new Vector3D(0030);
generic6Dof.getTranslationalLimitMotor().maxMotorForce = new Vector3D(0030000);
_physicsWorld.addConstraint(generic6Doftrue);
   
var 
timer Timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMERonTimer);
timer.start();

private function 
onTimer(TimerEvent) : void 
{
 
var vec Number generic6Dof.getTranslationalLimitMotor().targetVelocity.z;
 
generic6Dof.getTranslationalLimitMotor().targetVelocity = new Vector3D(00, -vec);   

The below issue was happen when I public this project to mobile devices.

Exception in thread "main" java.lang.OutOfMemoryErrorJava heap space
at adobe
.abc.GlobalOptimizer.createBlock(GlobalOptimizer.java:9949

(The attachment source code)

 

File Attachments
BasicTest.as  (File Size: 8KB - Downloads: 275)
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X