weedshaker

Members
  • Content Count

    6
  • Joined

  • Last visited

About weedshaker

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://shoga9team.com/

Profile Information

  • Gender
    Not Telling
  • Location
    Japan

Recent Profile Visitors

466 profile views
  1. @rich I have been developing on our game for over a year and always kept up to date with the newest versions. Although, a major api change couldn't easily be digested and for that we wouldn't move to a potential Phaser 3 with Pixi 4 anyways. I guess that this applies for most developers. Ether they are too far in their project to make major changes, port to new api versions, or they are at the start and should consider Lazer once it gets ready. Bottom line: Lets fix as many issues as possible on Phaser 2.4.x and make it an LTS till Lazer starts blazzn' and then we can jump on the new horse. Also, this will rather speed up Lazer and I am very looking forward to see more there, I certainly like what I have been seeing so far! Great work!
  2. Hey, yeah, I see your issue. Does using "acceleration" improve anything? Otherwise you could use p2.js.
  3. Hi, I worked it out with the continuous collision in p2.js. See my post here: http://www.html5gamedevs.com/topic/6502-bodytouchingdown/#entry107001 Cheers
  4. This is quite an old post but I wanted to show you guys how I solved this issue for myself: https://github.com/Weedshaker/phaser-p2Helper phaser-p2Helper makes it easy to keep track and manage p2.js physics object interactions. It is an advanced helper to keep track on the objects between the onBeginContact and onEndContact signal. Cheers
  5. Hey Valueerror, thank you a lot for this topic, saved me loads of time! I got the same issue but my character has more than one shape, so I made a little modification to the code you posted, that it works with multiple shapes and materials (the code is in es6): onPresolveContact(presolve){ let disableContact = false; let confirmedContactIndexes = []; presolve.contactEquations.forEach((contactEquation, index) => { // checks if bodyA or bodyB is equal this character body data and the colliding body is in jumpThroughMaterial Array if(contactEquation.bodyA === this.entity.body.data && contactEquation.bodyB.parent.data.shapes[0].material && this.jumpThroughMaterial.indexOf(contactEquation.bodyB.parent.data.shapes[0].material.name) !== -1 || contactEquation.bodyB === this.entity.body.data && contactEquation.bodyA.parent.data.shapes[0].material && this.jumpThroughMaterial.indexOf(contactEquation.bodyA.parent.data.shapes[0].material.name) !== -1){ // register all contacts which are in connection with this character body and eventually get disabled, if disableContact === true confirmedContactIndexes.push(index); // disable contactEquation Conditions if(this.entity.body.velocity.y < 0){ // disable when character moves upwards disableContact = true; }else if(contactEquation.bodyA === this.entity.body.data && contactEquation.contactPointA[1] >= -0.5){ // disable if bodyA (character body) is not above bodyB disableContact = true; }else if(contactEquation.bodyB === this.entity.body.data && contactEquation.contactPointB[1] <= 0.5){ // disable if bodyB (character body) is not above bodyA disableContact = true; } } }); if(disableContact){ confirmedContactIndexes.forEach((index) => { if(presolve.contactEquations[index]){ presolve.contactEquations[index].enabled = false; //disable contactEquation } if(presolve.frictionEquations[index]){ presolve.frictionEquations[index].enabled = false; //disable frictionEquation (solves the stuckInPlatform problem) } }); }}[Note:] "this.entity.body.data" refers to the sprite -> p2 body object "this.jumpThroughMaterial" is an array holding all material names which can be jumped through Using contactPoint instead of normalA seemed to allow more fine grained decisions... (what do you think?) at contactPoint A/B[1], it seemed to work the smoothest with 0.5 to confirm contact (let me know if you find a better value here!?) All contactEquations meeting the conditions get disabled after collecting them into "confirmedContactIndexes" and at least having one condition triggering disableContact === trueI dropped the course correction, since that made me loads of troubles. Cheers
  6. Hello, today, they released the BOX2D commercial Plugin for Phaser: http://phaser.io/examples/v2/category/box2d or at least came up with examples, so that somebody could start working with it. Anyways, I have been using P2JS on my ongoing development and have been pretty satisfied except that it is sometimes hard to work around issues with friction which applies on a body top but also side, so that a character will not slide on top but in return hangs on the side due to that friction, sure I found some workarounds but I was wondering if BOX2D would solve such issues better. Does someone have experience with both of the physics systems and if yes, what are the pros and cons of each? Thaks a lot!