a question about character move

Software: Away3D 4.x

datouaizi, Member
Posted: 19 January 2013 10:34 AM   Total Posts: 98

character flow collistionbox ,If box move up the slop, it will roll down itself.
but i want box move along slop when W key down ,and box rotation doesn’t change,that i want ;

floor code :
var floorCol1Mesh:Mesh = ground.getMeshByName(“floorCol1”);
  floorCol1Mesh.visible = false ;
  var floorColMeshl1Shape:AWPBvhTriangleMeshShape = new AWPBvhTriangleMeshShape(floorCol1Mesh.geometry);
  var floorColMesh1Body:AWPRigidBody = new AWPRigidBody(floorColMeshl1Shape,floorCol1Mesh,0);
  phyWorld.addRigidBodyWithGroup(floorColMesh1Body,1,2);


box code:

var shape:AWPCollisionShape = new AWPBoxShape(50,50,50);
  monstorAWP = new AWPRigidBody(shape, box ,0.1);
  phyWorld.addRigidBodyWithGroup(monstorAWP,2,1);
  monstorAWP.y = 120 ;
  monstorAWP.friction = 0.9 ;
  monstorAWP.collisionFlags = AWPCollisionFlags.CF_CHARACTER_OBJECT;
 
  monstorAWP.activationState = AWPCollisionObject.DISABLE_DEACTIVATION;

help me please!thanks all!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X