Search the Community

Showing results for tags 'local point'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 1 result

  1. Hi all, long time lurker, love the framework! The fact that I've done two weeks of coding without having to ask a question really shows the quality of Phaser, the docs, and the wealth of information on the forums! Unfortunately, I couldn't find an answer to this. I'm trying to get a local point on a P2JS body converted to world co-ordinates. To put it into context: I want another sprite to move to a specific point on a physics body. Funny enough, there are parameters in the physics.p2.createSpring() that allow you to specify local points on the bodies to attach the spring to. Similar parameters are found in the P2JS constraint cosntructors. However, looking at the source code taught me nothing because it's just a reference to the P2JS spring creator. I looked in the P2JS docs to find a LinearSpring.getWorldAnchorA() function, but calling it as results in the following error: Uncaught TypeError: Cannot set property '0' of undefined Phaser.js:79022 I suppose I could put the body in a group along with an invisible sprite to mark the local point and get, but that feels so hacky. I'd create an empty group to mark the point, but groups don't have a world attribute. I could found no function in the Phaser docs to convert a local point to a world point, which seems such a simple and common thing to do. Am I missing something?