New answers tagged

0

I would recomend you to refactor your code in a more modular way, i did once a ScenesManager module, give it a peek.


0

What you need to do is to calculate the normal of the collision then reflect the impact vel across the collision normal: // r = v - 2 * dot(v, n) * n; r = result vel, v = impact vel, n = normal of collision.


0

All Phaser display objects (group, sprites...) are based on PIXI ones. PIXI objects can be rendered in phaser render tree. the only problem is the update and postUpdate function. I solved it adding this simple patch: PIXI.DisplayObject.prototype.update = function () { }; PIXI.DisplayObject.prototype.postUpdate = function () { }; this patch adds a empty ...



Top 50 recent answers are included