Jump to content

p2 and .body.moves


gillisig
 Share

Recommended Posts

Hi guys, 

 

I am working on my first Phaser game and have one little question:

 

According to the (http://docs.phaser.io/Phaser.Physics.Arcade.Body.html#moves) I should be able to do:

 

spriteName.body.moves = false;

 

on a physics enabled sprite in order to allow the mouse input to move it around. But it doesn't seem to work using P2 physics, only arcade. Is there any way to achieve the same effect in P2 or am I doing something wrong? 
 

 

I am doing a pretty similar thing to this example except with P2: 

http://examples.phaser.io/_site/view_full.html?d=arcade%20physics&f=gravity+and+drag.js&t=gravity%20and%20drag

 

 

Thanks in advance!

Gilli 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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