Jump to content

Change the shape and change the loadPolygon?


kyodesu
 Share

Recommended Posts

Hello,

 

The loadPolygon method doesnt change when the shape of animation changes. 

 

    var ship = game.add.sprite(200, 200, 'player');
    ship.animations.add('fly', [0,1,2,3], 10, true);
    ship.play('fly');
 
    game.physics.p2.enable(ship, true);
    ship.body.clearShapes();
    ship.body.loadPolygon('physicsData', 'suu');
    
    ship.body.fixedRotation = true;
 
 
The loadPolygon is the same. How can i change the shape and the loadPolygon the same time?
 
 
Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...