• Content Count

  • Joined

  • Last visited

  1. Will do! Pushed it. Looks good so far, but I'll keep an eye out
  2. Thank you for the help! I was able to get it working by having the player ignore the level entity: game.playerEntity: onCollision : function (response, other) { if (other instanceof game.PortalEntity) { return false;} return true; } game.portalEntity: (My level entity subclass) onCollision: function onCollision(response, other) { if (!this.supressed) { if (response.overlap >= other.body.width / 4) { this.goTo.apply(this); } } return false; }, This prevents the goTo from applying when you just lightly brush the levelEntity (which would sometimes happen as you walked by one, but didn't actually intend to go through) If you want to give it a try, I put a quick test up at (note it is just basic map navigation. you can't do anything yet Now I'll work at carrying velocity through as you exit. Thanks again!
  3. I've created a subclass of me.LevelEntity, but it doesn't seem possible to set the collision system to allow objects fully overlap (it always pushes the colliding items out). Is the correct path to do something like this in the level entity? Or will this be highly inefficient? It seems a similar check is done every frame anyway. update : function (dt) { this._super(me.LevelEntity, 'update', [dt]); var player =[0]; var collide = player.getBounds().overlaps(this.getBounds()); if (collide) { // check percentage overlap, and trigger level transition } }, Thanks for the advice!
  4. Greetings! I've very much enjoyed getting to know MelonJS, and had an initial question: for LevelEntity objects in TMX maps, I wanted to adjust the behavior —  The default is to trigger the level transition as soon as the play object even touches the Level object. I'd like (and might even suggest as default behavior) to have the level transition as soon as the Player object is mostly CONTAINED by the level object. This would make many of the transitions more natural. You'd be able to walk on to stairwells, doorways, or into other level switch regions. What is the best way to override the default? I tried a few things, including setting a custom LevelEntity to "me.collision.types.NO_OBJECT", but that disables the triggering. Thanks in advance for any help!