Search the Community
Showing results for tags 'r.u.b.e.'.
Took me forever to figure this out so wanted to share so someone else doesn't have to take forever to figure this out! If you load in a R.U.B.E. generated Box2d scene, setting body.velocity.x or body.velocity.y will not work, nor will body.moveLeft(n), body.moveRight(n), body.moveUp(n) and body.moveDown(n). You have to set body.data.m_linearVelocity.x and body.data.m_linearVelocity.y instead.
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, f
How can I attach a sprite to an existing body? I am loading in a world created using R.U.B.E., so I cannot simply create sprites and use game.physics.box2d.enable(sprite). I'm not seeing anything in any of the public or extra examples that come with the paid plugin. body.sprite = sprite doesn't work.
I purchased both the Box2D plug-in and R.U.B.E. and I'm in the process of converting a Flash game to HTML5. One thing I'm stuck on is how to make a motorized wheel. I have a large wheel circle with a small gear circle in the center of it and I'm using a revoluteJoint with a motor. This does not spin the wheel: var wheel = levelScene.getBody('wheel');wheel.friction = 1;var gear = levelScene.getBody('gear');//bodyA, bodyB, ax, ay, bx, by, motorSpeed, motorTorque, motorEnabled, lowerLimit, upperLimit, limitEnabledgame.physics.box2d.revoluteJoint(wheel, gear, 0, 0, 0, 0, 3, 1000, true);Changing t