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

  • Home
  • SEARCH
  • 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 8104605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:53:51+00:00 2026-06-05T23:53:51+00:00

I have clouds that are scrolling left to right. I’m using an OrthographicCamera to

  • 0

I have clouds that are scrolling left to right. I’m using an OrthographicCamera to do so. I was wondering, how would i adjust these clouds in order to cause them to move towards the screen, rather than from left to right? Could i still use the Orthographic camera to do so? How would i do this?

My code is as follows:

public void create() {  

        sky = new SkyFlux();

        //getting the height and width for setup purposes
        float w = Gdx.graphics.getWidth();
        float h = Gdx.graphics.getHeight();

        //setting up camera and batch
        camera = new OrthographicCamera(1, h/w);

        //setting up sky
        for(Texture texture:sky.getTexture())
            textures.add(texture);

        //Adding the sky related sprites
        for(Sprite sprite:sky.getSprite())
            skySprites.add(sprite);
}



public void render() {

        //clearing everything out
        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
        time += Gdx.graphics.getDeltaTime();
        if(time > 1.0f)
            time = 0.0f;

        float speed = 1.0f;

        //Adjusting the speed of the sprites except the first sprite which is the base image.
        for(int i=1;i<skySprites.size();i++) {
            skySprites.get(i).setV(time+speed);
            skySprites.get(i).setV2(time);
            speed = speed+1.0f;
        }

        //setting up
        batch.setProjectionMatrix(camera.combined);

        //begging draw
        batch.begin();

        //items to be drawn
        //TODO: add other items to be drawn here
        for(Sprite sprite:skySprites)
            sprite.draw(batch);


        //ending draw 
        batch.end();
}
  • 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-05T23:53:53+00:00Added an answer on June 5, 2026 at 11:53 pm

    Orthographic projections by definition store no depth information. The only way you can make the appearance of clouds coming towards the screen is to increase the sprite size – but I advise against it.

    You should use a non-orthographic projection and just use the z-axis.

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

Sidebar

Related Questions

I have point clouds that I need to visualize, currently I use Pixel based
Let's say I have 3 point clouds: first that has 3 points {x1,y1,z1}, {x2,y2,z2},
I have read a few articles that say in order to have a PCI
for example I have collection foo of documents like that: {tag_cloud:[{value:games, count:10}, {value:girls, count:500}]}
I have a 3D point clouds with million of points. I want to store
I have a cloud and a man sprite, these are both drawn separately but
I have a level class and a Enemy_control class that is based off an
I have a very critial business application presently running using Winforms. The application is
I'm working on a shader that generates little clouds based on some mask images.
I have a cloud of points that are supposed to represent a face. I

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.