NotSteve Posted April 2, 2014 Share Posted April 2, 2014 Hi, I was just wondering if there was anyway to use the moveToPointer function when using P2 physics or if there was anything similar to that. I'm trying to get bullets to move to the user's pointer.Thanks! Link to comment Share on other sites More sharing options...
valueerror Posted April 2, 2014 Share Posted April 2, 2014 i would like to know that too... in the meanwhile this will maybe help you http://www.html5gamedevs.com/topic/4826-help-arcade-physics-with-p2-objects/?p=29613 Link to comment Share on other sites More sharing options...
Wavertron Posted April 2, 2014 Share Posted April 2, 2014 I've been using the old arcade methods like moveToXY, distanceTo, angleTo on P2 sprites successfully so far. I did so inadvertently when upgrading to phaser2, and only realised later. Haven't really seen any issues so didn't bother to try and write my own functions. I can only guess that the arcade functions I've used rely on elements common to both P2 and Arcade bodies (ie position x y, velocity x y, world x y etc) so it works ok. But that's just my experience so far. I guess it could break all of a sudden. Link to comment Share on other sites More sharing options...
NotSteve Posted April 2, 2014 Author Share Posted April 2, 2014 i would like to know that too... in the meanwhile this will maybe help you http://www.html5gamedevs.com/topic/4826-help-arcade-physics-with-p2-objects/?p=29613 Got it working using that. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts