7
votes
Accepted
LibGDX - My sprite glitches when it moves
It happens because you update the camera's position out of sync with the player's position.
In public void render(float delta) ...
2
votes
Accepted
reposition object in circle
For circle p2 and p3 to be close enough to eachother to touch, we know that the distance between them must be ...
1
vote
Accepted
Draw more sprite but they disappear
You have many enemy sprites, but only one position variable.
In your loop, you take turns to draw every sprite at the same position, so they stack up and you see only one.
You do not want an instance ...
1
vote
Accepted
Drawn enemy random on different position
The idea is to store the information of an enemy into a class instance. Here is the pseudo-code of what I have in mind.
I've added pseudo-comments to the pseudo-code to explain what's going on.
...
1
vote
Accepted
Fade in with stage libgdx doesn't work
Do not call addAction every time in the render method, doing that will cause your Stage to ...
1
vote
Create a transition fade out in libgdx
There are many different ways of achieving this depending on how much control you need over what the fade looks like.
If you need very fine-grained control then an option is to render each ...
1
vote
Error using Asset Manager for loading files from Android temp directory (libgdx)
I solved it. The problem was the FileHandleResolver asociated with the Asset Manager. The default is internal. What I did is create two Asset Managers inside my MyAssetManager class. One for absolute ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
libgdx × 2271java × 955
android × 435
box2d × 271
collision-detection × 104
2d × 98
opengl × 94
sprites × 91
textures × 81
scene2d × 80
camera × 68
rendering × 64
physics × 55
tilemap × 55
animation × 54
tiled × 43
input × 41
mathematics × 39
rotation × 39
movement × 37
shaders × 35
fonts × 35
graphics × 33
tiles × 33
android-studio × 33