Search the Community

Showing results for tags 'impulse'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 3 results

  1. Hi guys, I am wondering how I can remove all the effects of an impulse. I made a playground here( So there are 2 same boxes, I hit the box1 with the impulse1 first, then I hit both boxes with the impulse2 respectively(I reset position, quaternion, LinearVelocity and angularVelocity before applyImpulse) I expect them to have same track and final position, but seems box1 still have the effects from impulse1, what else do I need to reset to entirely remove the influence form impulse1? and I am curious why the LinearVelocity and angularVelocity is not zero when the box stop on the ground from the dropping?
  2. Hello, How might I apply constant movement using oimo.js such as would occur in an asteroid field - where no object stops moving? That is not the task, but best describes it. By the way I do have borders so the objects are contained. But even if I set no friction and a restitution of 1, no matter how I've tried to apply the impulse, I cannot keep to objects moving. There is no gravity in the scene. Thanks, DB
  3. I have a p2 Object with the following properties, true); this.player.body.clearShapes(); this.player.body.loadPolygon('playerPolygon','player'); this.player.body.allowRotation = false; this.player.body.fixedRotation = true; this.player.body.immovable = true; this.player.body.setCollisionGroup(playerCollision); this.player.body.collides(ballCollision); this.player.body.kinematic = true;[0].sensor = false; this.player.body.collideWorldBounds = true; The above object can only move along its X axis and I want to trigger push/ hit force to its impacting object on collision; this.ball.body.setCircle(28); this.ball.body.collideWorldBounds = true; this.ball.body.allowRotation = true; this.ball.body.fixedRotation = false; this.ball.body.adjustCenterOfMass(); this.ball.body.setCollisionGroup(ballCollision); this.ball.body.collides(playerCollision); The above object is always the impacting object whose movement is controlled by gravity and impulse. I'm trying to figure out how to calculate the following:- The point of collision on the body of "this.player" The impulse to apply to the impacting object after collision to simulate a proper/ accurate deflection setting the projected angle and speed/ velocity what properties of the impacting object do I set? Force? AngularVelocity? Velocity?