Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:54:23+00:00 2026-06-11T16:54:23+00:00

So I am using libgdx’s stage class for my game so far I added

  • 0

So I am using libgdx’s stage class for my game so far I added an actor to the stage which just draws a background for the screen, the problem I’m having is that when I move the stage’s camera to simulate a scroll through the screen (the background image is larger than the screen) the camera won’t move. Now what is driving me crazy is that it DOES work when I run in on the desktop launcher, but whenever I run it on the phone it just won’t scroll. I really don’t know what could be the problem. I ensued that the method that moves the camera gets called cause I am logging the method’s name to the log cat whenever it gets called and it does get called. Also, I even logged the camera’s position and it changes but only if I run on the desktop, if I run on the phone it logs the same position. I don’t know if this is a bug cause I think is quite strange that it only works on the desktop launcher, and yes both the android launcher and the desktop launcher are initialized with the same ApplicationListener instance. Any suggestions? Thanks in advance.

Here is the simplified code:

public void Create()
{
GameStage = new Stage(2000, 2000, true);

GameCamera = new OrthographicCamera(2000, 2000);
GameCamera.setToOrtho(true, 2000, 2000);

GameStage.setCamera(GameCamera);
GameStage.setViewport(2000, 2000, true);
}

public void MoveCamera()//it gets called when user drags across the screen
{
GameStage.getCamera().translate(x, y, 0);
GameStage.getCamera().update();
}


public void render()
   {
      //the background actor has been added at this point

      Gdx.gl.glClearColor(0, 0, 0, 1);
      Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

      GameStage.act(Gdx.graphics.getDeltaTime());
        GameStage.draw();

   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:54:24+00:00Added an answer on June 11, 2026 at 4:54 pm

    I just realized it was indeed a problem in other of my functions which wasn’t updating the camera position, so it has nothing to do with libgdx sorry I wish I could delete the question, it is strange it was working on the desktop though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a game for Android using libgdx. Here is some code that draws
I'm currently using libgdx for game I'm writing, and I just continued writing this
I am using libgdx on a little game and I have a little animation
I'm building a little Android game using libgdx. For now I have a copy
I'm developing a game using the libGDX Framework. I'd like to implement an icon
Using android 2.3.3, I have a background Service which has a socket connection. There's
I am developing a game using LibGdx, when i tried to run the game
Hi I am developing a game using libgdx framework, in that i am unable
I am making game for android using libgdx my requirement is that when character
I'm using LibGdx to develop a Java-based game. I haven't decided whether I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.