Package com.bulletphysics.dynamics

Examples of com.bulletphysics.dynamics.RigidBody.applyImpulse()


                impulse.normalize();
                float impulseStrength = 10f;
                impulse.scale(impulseStrength);
                Vector3f relPos = new Vector3f();
                relPos.sub(rayCallback.hitPointWorld, body.getCenterOfMassPosition(new Vector3f()));
                body.applyImpulse(impulse, relPos);
              }
            }
          }
        }
        else {
View Full Code Here


          // apply previous frames impulse on both bodies
          body0.applyImpulse(totalImpulse, rel_pos1);

          tmpVec.negate(totalImpulse);
          body1.applyImpulse(tmpVec, rel_pos2);
        }

      }
    }
  }
View Full Code Here

          rel_pos.z *= wheel_info.rollInfluence;
          chassisBody.applyImpulse(sideImp, rel_pos);

          // apply friction impulse on the ground
          tmp.negate(sideImp);
          groundObject.applyImpulse(tmp, rel_pos2);
        }
      }
    }
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.