Jump to content

Search the Community

Showing results for tags 'separation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. I have a scene where blocks fall from the sky onto the ground. As they do, they stack up thanks to collision separation. I noticed however that after the stack reaches a height of two or three blocks the incoming block somehow forces blocks at the bottom to lose their separation. I want to stop that from happening. If two blocks collide they should remain separated. I am using the arcade physics, (hope that's not the problem). here is the code window.onload = function() { 'use strict'; var state = { lastCheckin: 0, pandas: null, preload: function () { game.load.image('panda', 'assets/panda.png'); }, loadUpdate: function () { }, loadRender: function () { }, create: function () { game.physics.startSystem(Phaser.Physics.ARCADE); this.pandas = game.add.group(); }, update: function () { game.physics.arcade.collide(this.pandas, this.pandas); var now = Date.now(), delta = now - this.lastCheckin; if (delta > 1000) { this.lastCheckin = now; var panda = game.add.sprite(Math.random() * game.world.width, 0, 'panda'); this.pandas.add(panda); game.physics.arcade.enable(panda); panda.body.gravity.y = 500; panda.body.collideWorldBounds = true; } }, render: function () { }, paused: function () { }, pauseUpdate: function () { }, shutdown: function () { } } var game = new Phaser.Game(320, 480, null, null, state);};
×
×
  • Create New...