by increasing the mass of the actor starts to jump Author Message
Babulesnik
Member

 Post: #1 by increasing the mass of the actor starts to jump by increasing the mass of the actor starts to jump. The second actor to bend under him((( Init PHP Code: `Physics.gravity(Vec(0,-40,0));   FREP(5){ObjItem[i].actor.active(false);} ` Update PHP Code: `if(Kb.bp(KB_SPACE))   {              Pos[0]=Vec(29.641,17,-2.182);Pos[1]=Vec(29.641,17,-1.574);Pos[2]=Vec(29.021,17,-2.156);Pos[3]=Vec(29.021,17,-1.552);Pos[4]=Vec(28.378,17,-1.870); //устанавливаем стартовые позиции кубиков для броска       FREPA(ObjItem)       {         ObjItem[i].matrix(Matrix(ObjItem[i].matrix().rotateXY(Random.f(45),Random.f(45)))); //крутим матрицу кубика         ObjItem[i].pos         (Pos[i]);         ObjItem[i].actor.active(true  );         ObjItem[i].actor.mass  (10    );        // ObjItem[i].actor.addImpulse(Vec(0,-2,0));       }   } ` Attached File(s) Image(s)             (This post was last modified: 08-28-2011 10:14 AM by Babulesnik.)
08-28-2011 09:55 AM
Babulesnik
Member

 Post: #2 RE: by increasing the mass of the actor starts to jump Use ObjItem[i].actor.ccd (true); did not help ((((( PHP Code: `if(Kb.bp(KB_SPACE))   {              Pos[0]=Vec(29.641,17,-2.182);Pos[1]=Vec(29.641,17,-1.574);Pos[2]=Vec(29.021,17,-2.156);Pos[3]=Vec(29.021,17,-1.552);Pos[4]=Vec(28.378,17,-1.870); //устанавливаем стартовые позиции кубиков для броска       FREPA(ObjItem)       {         ObjItem[i].matrix(Matrix(ObjItem[i].matrix().rotateXY(Random.f(45),Random.f(45)))); // крутим матрицу кубика         ObjItem[i].pos         (Pos[i]);         ObjItem[i].actor.active(true  );         ObjItem[i].actor.mass  (10    );         ObjItem[i].actor.ccd   (true  );       }   } `
08-29-2011 04:03 PM
Seba
Member

 Post: #3 RE: by increasing the mass of the actor starts to jump Set actor density.
08-29-2011 06:18 PM
Babulesnik
Member

 Post: #4 RE: by increasing the mass of the actor starts to jump (08-29-2011 06:18 PM)Seba Wrote:  Set actor density. Thank you very much it works ! I noticed that if I increase the size of an actor it helps, why ?
08-29-2011 06:59 PM
 « Next Oldest | Next Newest »