Search the Community
Showing results for tags 'world construction kit'.
-
Hello, I'm converting a Box2D project from Flash and World Construction Kit to HTML5 using Phaser and R.U.B.E. and ran into something I'm not sure how to solve. I have round bodies that land on a kinematic body which is repositioned when the user clicks on it so that it flings them a little bit. Not quite like a catapult, but more like if you were on one end of a seesaw and you were lifted up quickly so you got some air. The bodies get air in the Flash version, but in the Phaser version they don't get any. I've attached videos to illustrate this. I checked all of my variables (density, friction, gravity, etc.) and didn't find any differences. I tried changing the position of the platform more quickly, but that didn't help. I have other cases where I lift up a square body quickly to fling a round body when it hits a sensor above it. In my Flash version I don't have to do anything but that, but in Phaser I also have to use applyForce(x, y) on the body to compensate for the lack of power. That's an easy fix for that case, but for this one I'm not sure how I would handle it. I suspect that World Construction Kit might be updating the linear and angular velocity of the platform when it is repositioned which might give it that extra kick. If that's the case and Phaser doesn't do this, I'll have to calculate and update those variables manually somehow. I'll dig into this deeper to see if this is what's up, but any insight would be much appreciated! videos.zip