You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asteroid hitboxes, possible also the ship's, are way too big. You need a contoured mesh, not a circle/box around the asteroid and the ship. In some cases the ship was obviously nowhere near the asteroid they still collided
To fix this is to use a json outline of the sprites as described in this tutorial. So something like:
vm.preload = function(){
// stuff...
// load the physics data json
game.load.physics('asteroidPhysics', 'asteroid_physics.json');
// more stuff..
}
// even more stuff...
vm.asteroid = vm.game.add.sprite(
rnd(w*2/3.0, w*9/10.0),
rnd(h/10.0, h*9/10.0),
'a3');
// remove all of the current collision shapes from the physics body
vm.asteroid.body.clearShapes();
// load our polygon physics data
vm.asteroid.body.loadPolygon('asteroidPhysics', 'asteroid1');
first we need to get those .json files for the ship and the asteroids, and the recommended software is windows/mac exclusive (boo).
(from here)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: