Bavragor Posted April 1, 2016 Share Posted April 1, 2016 The title is pretty self explanatory. Is there any method, in P2 physics, that has the same effect as the velocityFromRotation method in Arcade physics? If there ain't any equivalent, is there a different way to solve this "problem". Thanks in advance! Link to comment Share on other sites More sharing options...
megmut Posted April 1, 2016 Share Posted April 1, 2016 Not sure how much of the docs you've read though, but P2 has a few things related to this: http://phaser.io/docs/2.4.6/Phaser.Physics.P2.Body.html#angularVelocity I've not actually used velocityFromRotation, so I don't know if there is a direct counter-part in P2, but the docs would be a good place to start Link to comment Share on other sites More sharing options...
Bavragor Posted April 3, 2016 Author Share Posted April 3, 2016 HI memgut, Thanks for your answer, but it was not exactly what I was looking for. I got where I wanted to be in the end by calculating the angle between two points and using that angle to define the velocity x and y. Thanks anyhow Link to comment Share on other sites More sharing options...
megmut Posted April 3, 2016 Share Posted April 3, 2016 Haha, no problem, Can't beat a bit of Trig Link to comment Share on other sites More sharing options...
Recommended Posts