Hot answers tagged


I don't know if it will helps you but, I had a similar problem. I resolve it by adding a border to my assets in "TexturePacker". You just have to open the "Advanced Settings" And at the bottom, just add a border padding of 2 pixel as it recommended. It should help you =)


libGDXs Vector2 class has the methods you need to calculate this. By defining a barrelOffset barrelOffset = new Vector2(1.0f, -0.5f).scl(0.5f); // Relative coordinates to where the barrel is in the sprite as the relative position of the barrel in the sprite, we can figure out where the rotated barrel is by taking the position of the player and adding the ...


You can do this by setting LayoutParams on your Android Window where you specifiy screenBrightness. If you define some interface in your core like: public interface WindowController { void setBrightness(float factor); } And take a reference to that in the constructor of your game-class: public class MyGdxGame extends ApplicationAdapter { ...


Well, so i added a double exclamation mark to the end of the createThis.bodyInTheWorld createThis.bodyInTheWorld!!.createFixture(temporaryShape, 1f) and everything suddenly started to work, i still have no idea how it works at all, anyone care to explain?

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