Jump to content

Phaser Points from Polar Coordinates


Ajedi32
 Share

Recommended Posts

Quick question: I want to update a sprite's P2 body force to equal a constant value in a given direction. With polar coordinates, that's easy: I just set the magnitude and direction to what I want. With phaser points though, the only function for setting a point's coordinates directly (Phaser.Point#set) only seems to support cartesian coordinates.

 

Is there an easy way to set a Phaser point to a set of polar coordinates, without having to convert from polar to cartesian coordinates myself?

 

(Cross-posted on StackOverflow)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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