Tag Info

New answers tagged

0

SOLVED! Ok so the idea to check if our player body left the body of our path is to count borders playerbody passes. So in contactlistener we make beginContact to add one to some int variable (lets say bordersPassed) and endContact subtracts one from it. So when our player is inside path this variable will always be bigger than 0. When it leaves path it will ...


0

Oh! i got solution by myself... I did the same thing as i mentioned in first comment my question where I attached balls on a big circle body like, Body circleBody ... ;// having large radius //for all balls arranged in hexagon structure foreach BallBody b { WeldJointDef def = new WeldJointDef(); def.initialize(b, circleBody, b.getWorldCenter()); ...


1

The goal of sprite sheets is to reduce the number of texture bindings. As you probably need to bind different textures (other than your animations) during a single frame you'll always have at least one texture bind to select one of the spritesheets back on the next frame. Whichever texture your bind on the next frame will have the same penalty as the data ...


1

If the circles never need to move independently, you can make one body. See here for an example of a hexagon body. I've extracted the relavent bits and pasted them here: import static org.anddev.andengine.extension.physics.box2d.util.constants.PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT; import com.badlogic.gdx.math.Vector2; import ...


0

I am using farseer physics engine which is almost identical with box2d. In the public void endContact(Contact contact) function you have made, you should check contact.IsTouching value, if it is false you are outside of the race track. However that will mean you are completely outside of the track i guess ? Is this the behavior you want in your game ?


0

Try using the android:screenOrientation="landscape" option in the manifest file's activity tag.



Top 50 recent answers are included