Tag Info

Hot answers tagged

3

Directly editing the position of a box2d body will produce non-physical behaviour, it's present because sometimes you will need to teleport bodies to a far away location, or reset the position of an object without the need to destroy/re-create it, etc... In your case the joints are not handling the position adjustments well. The setPosition function should ...


2

Why would you make the game free on android and let PC users pay $10 + $1/month? The big trend for most indies is building a fanbase as soon you have something to show from your game. Blogging about everything that involves your game and perhaps let your fans influence your design. You can find a lot of sources at open indie developers like Grid Sage ...


1

I found the solution, so I think I should write here for other ones later. First I download the source code of box2dlights. Then open BaseLight.java and find "segments" member variable. This variable contains all information about what I was finding. This code below is just for debugging purpose: rayHandler.setCombinedMatrix(camera.combined); ...


1

Shortly after posting I tested this out a bit more and found that the assert will fail. GetFixtureA() may or may not return a fixture belonging to playerPhysicsBody. I'm now using this convenience function to safely find the fixture that I want: inline const b2Fixture *contactFixtureFor(const b2Body *body, const b2ContactEdge *contactEdge) { return ...


1

You're right, it can be done in two ways: -Moving the player -Moving the world This seems like a 50-50 deal. It doesn't matter how you do it, right? I don't agree. I would ALWAYS suggest moving the player. Because if you choose to move the world now, and a few months further on in development, when you have enemies, npc's, and other entities on screen, ...



Only top voted, non community-wiki answers of a minimum length are eligible