Tag Info

Hot answers tagged

4

There are several different options for handling what you are attempting: These are not all or nothing solutions, you can mix and match them to balance the workload between programming and creating animations. Option 1 Can be used on a case by case basis. Obscure it. The transition between animation states can simply be hidden behind various effects. Blood ...


1

Your problem is that the physics library, probably Box2D, supports only convex shapes. You are passing in a non-convex (concave) shape, and what you get as a result is that the convex hull of your shape is used as collision body. To avoid this, you can either manually make sure your collision primitives are convex, or you can triangulate the polygon (there ...


1

On LibGDX you have a so called InputProcessor public class MyInputProcessor implements InputProcessor { @Override public boolean keyDown (int keycode) { return false; } @Override public boolean keyUp (int keycode) { return false; } @Override public boolean keyTyped (char character) { return false; } ...


1

in drops.update: @Override public void update() { pos.add(direction); //add the speed difference for the next update direction.add(new Vector2(0, -acceleration)); if (pos.y <= -TextureManager.DROPS.getHeight()) { float x = MathUtils.random(0, ManicMeltdowns.WIDTH - TextureManager.DROPS.getWidth()); pos.set(x, ...


1

I think the only way to achieve a good result with Box2D is scaling things down. I use two OrthographicCameras for my games, one for HUD stuff and another to Box2D related stuff. Also, I use methods for scaling images and elements down. Here's an example of what I'm talking about. (It's not a working example. Just illustrating...) private final float SCALE ...


1

LibGDX has Viewport, which helps you do exactly what you are trying to achieve. You use the Viewport to specify where the Stage should be drawn and how big it is. The Viewport does not change the local coordinate system of the Stage itself, so you don't have to add an x offset to everything you want to include in the right hand stage (everything starts at ...



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