Jump to content

2.5 and box2d plugin


rtlehr
 Share

Recommended Posts

Really sorry if this has been posted and solved, but... I just purchased the Box 2d plugin and it does not seem to work with 2.5.  Works fine with 2.1, but when I switch to 2.5 it breaks.

Is there a solution for this?

Thanks,

Ross

Link to comment
Share on other sites

TypeError: undefined is not an object (evaluating 'this.target.worldPosition.x')        updateTarget — phaser.js:28866

 

below is the JS included into the file.  I'm working with the car on terrain.html file

<script src="js/phaser.js" type="text/javascript"></script>
<script src="js/box2d/box2d-plugin-full.min.js" type="text/javascript"></script>

 

Thank you,

Ross

Link to comment
Share on other sites

The problem with that example is the Camera.follow call, it's trying to follow a Box2D Body, which isn't a valid Sprite (it has no worldPosition property, so throws that error). The error is with Camera.follow rather than the plugin. I will see about updating it, though it won't change the plugin itself.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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