Questions tagged [libgdx]
LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and your WebGL enabled browser.
2,294 questions
1
vote
1
answer
107
views
Objects move with different speed on different devices
I was making a 2d top-down game, but when I tested it on two devices (Samsung M31 and Samsung S25) there was a problem with player speed - it was faster on S25 and slower on M31. I tried using some ...
0
votes
0
answers
65
views
LibGDX NullPointerException from a scene 2D Actor calling Pools.obtain()
fire (Event event) method throws the NullPointerException. Trace:
...
0
votes
1
answer
109
views
How to drag existing body to another position?
I have a game object with a Kinematic body and a sprite. The object's "draw" method will always position the sprite to match a position of actual body, so the sprite is completely passive.
...
0
votes
1
answer
82
views
Consistency of accelerometer controls between devices
I'm thinking of making a game where using the phone accelerometer, the player would apply an appropriate force (adding velocity) to a Box2D body. Now, I know technically how to implement that, but I ...
1
vote
1
answer
126
views
Why is my raycast not working?
I'm trying to ray-cast mouse clicks to the surface of a sphere (from which point, I'm going to get the coordinates of the vertex of the sphere's mesh that are closest to the click). The following ...
1
vote
1
answer
144
views
Icosahedron missing triangles
I'm trying to create an icosahedron (I've been trying to figure this out for about a week).
Basically, I followed this article to create an Icosahedron mesh in code, and the positions of the vertices ...
0
votes
1
answer
103
views
LibGdx sprite isn't rotating correctly around its own axis
I'm currently trying to rotate a sprite around its own axis to make it "face" the mouse, but I'm having weird results. This is my code:
...
1
vote
1
answer
193
views
How do I add dependencies to my libGdx project?
I am currently using libgdx and IntelliJ to develop a real-time space 4x game. I ran into an issue, where I am trying to include lua scripts in my project (for the sake of allowing players to mod new ...
1
vote
1
answer
73
views
LibGDX TiledMap - get embedded objects from TextureMapObject
Is there a way of getting embedded objects defined within Tiled's collision editor from TextureMapObjects?
It'd be great if I could place texture objects around on an object layer and also include ...
1
vote
2
answers
145
views
Bullet Physics stopping model from going through static object
Bullet physics tunneling problem:
yellow box(dimensions: 2f, 2f, 2f) that falls under gravity. Its Bullet Physics are set as such:
...
0
votes
1
answer
72
views
Differences between rotations and translations of different camera properties in LiBGDX
I am trying to understand the camera API (applicable to perspective camera ONLY) of LiBGDX.
It really does not make sense that you can call rotate and translate on many different properties of the ...
0
votes
1
answer
92
views
Rotate modelinstance node about its own centerpoint y axis in LiBGDX
I am trying to rotate the node of a modelinstance as follows:
Note: the node and modelinstance are rotating BUT not about their own center Y axis!
...
1
vote
1
answer
221
views
Separate Sword Sprite from Player
I am aware that a common approach in game development for attack animations is to separate the player from the weapon and 'stitch' them together at runtime, depending on the weapon equipped.
This ...
1
vote
0
answers
61
views
Finding a modelinstance in LIBGDX from a Scene by node id
I have loaded a 3d scene from Maya into Libgdx: It has two polygonal objects(meshes)
One object is labeled as: chamber
The other object: it has another name
I load the Maya scene as such:
...
0
votes
1
answer
66
views
Modifying the transform of a modelinstance in libgdx
Using libgdx I need to move back and forth by a very small amount a soldier head:
I do the following: But the soldier head is flying up into the y axis out of the screen:
...