Skip to main content

All Questions

0 votes
1 answer
581 views

How to make the camera move in the direction 3D Libgdx

I'm new in Libgdx and I'm developing 3d game in libgdx, so I want to create first person system, I created a class -playercontroller- to move the player and then make the camera move with player and ...
Osama Gamal's user avatar
0 votes
0 answers
778 views

How to rotate Perspective Camera in 3D Libgdx

I'm creating 3d game with libgdx but I have problem, I want to rotate the camera on touch the screen , so I added this from libgdx wiki @Override public boolean touchDragged (int screenX, int ...
Osama Gamal's user avatar
3 votes
1 answer
2k views

Applying a perspective transformation matrix from GIMP into a GLSL shader

So I'm trying to add a rotation and a perspective effect to an image into the vertex shader. The rotation works just fine but I'm unable to make the perspective effect. I'm working in 2D. The ...
Winter's user avatar
  • 4,056
0 votes
0 answers
136 views

How do I use a PerspectiveCamera with a Stage and Viewport

I am trying to write a game using Scene2d Stages and Box2d. When I test my setup with an Orthographic camera it displays everything as expected, but when I switch to a Perspective camera I always end ...
Nick Cardoso's user avatar
  • 21.6k
0 votes
2 answers
926 views

LibGDX - Camera rotation

I'm trying to develop a 3D game and I'm having a problem with camera rotation because it uses Vector3 axis and an angle. I've tried searching the maths for it but I'm confused and I'm pretty slow too. ...
Juliano Hilario's user avatar
0 votes
1 answer
589 views

LibGDX + ARCore: Usage of multiple cameras and viewports

I have an app combining LibGDX and ARCore, based on https://github.com/google/helloargdx This works perfectly for the fullscreen. Now I have a different requirement: I split the landscape oriented ...
mbauer's user avatar
  • 183
0 votes
3 answers
87 views

libgdx modelinstances position changed after calling camera.position.set or camera.lookat

I have my camera with below initial settings: camera.lookAt(200f, 100f, -300f); camera.position.set(0f, 0f, 0f); and the modelinstances displayed as below: initial image I coded a button on click and ...
Herman Tse's user avatar
1 vote
0 answers
44 views

LibGDX 3DSphere is changing shape while moving on the screen with mouse

I have created a sphere using Texture by calling createSphere() method on modelBuilder using libGDX. As it is 3D, I used Perspective Camera. I am trying to move the sphere on the screen with the mouse....
Praveen Nalluri's user avatar
2 votes
1 answer
4k views

Calculating frustum FOV for a PerspectiveCamera

I currently have a screen consisting of two areas: (Values are just assumed for this particular example and may of course vary depending on screen). The screen in total is 1080x1432px (WxH) and ...
Henrik's user avatar
  • 1,995
-1 votes
1 answer
43 views

Convert Screen co-ordinates to Prspective camera co-ordinates in libgdx?

I am developing 3d game using libgdx .i have to move my model on touchdrag() . how can i convert my touch co-ordinates to perspective camera co-ordinates.
Avinash kumar's user avatar
0 votes
1 answer
483 views

LibGDX 3D Camera spasm when player looks directly up or down

My circumstance I am making a 3D LibGDX game. I am using a custom camera controller, based off of the one over here. It takes out the use of delta Y, when determining where to move the player, so ...
Fishy's user avatar
  • 1,293
0 votes
0 answers
291 views

Libgdx - Converting 2D map coords to 3D space coords

I have an object moving about in a flat 2D coordinate system (0-1000,0-1000). In a 3D space coordinate system, I have a sphere and a camera looking at the sphere. I then want to convert these 2D ...
Jammo's user avatar
  • 2,076
0 votes
0 answers
782 views

Combine Orthographic and perspective camera libgdx

How can I properly mix them together? I'm showing tiled map in ortho. camera and now I want the buildings to reach higher (GTA1 style). I'm not sure how to synchronize, I guess better will be, to just ...
Zveratko's user avatar
  • 2,811
2 votes
0 answers
194 views

Libgdx rotate ModelInstance towards PerspectiveCamera

When I translate my ModelInstance up, I see the bottom of my ModelInstance and I want to see it correctly (rotate the ModelInstance towards the PerspectiveCamera). Here is an example : In the ...
Wingjam's user avatar
  • 782
3 votes
1 answer
946 views

LibGDX - perspective camera smooth translation & direction

I am trying to implement smooth 3D camera in my game. So, I have a few reserved positions and directions and I want to change view of my camera by applying them to my camera. Now I am doing it like ...
Nolesh's user avatar
  • 6,998

15 30 50 per page