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 8064697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:26:59+00:00 2026-06-05T11:26:59+00:00

I want to render a particle effect in 3D using the Z coordinate. I’ve

  • 0

I want to render a particle effect in 3D using the Z coordinate. I’ve tried to implement a own ParticleEffect using Decals instead of Sprites without success.

Is there any other way to render a ParticleEffect using the Z coordinate? Maybe by manipulating the transformation Matrix of the SpriteBatch?

Update:

working code

// update projection each frame since my camera is moving
spriteBatch.setProjectionMatrix(camera3d.projection);

for (ParticleEffect effect : effects){
    spriteBatch.setTransformMatrix(camera3d.view);
    spriteBatch.getTransformMatrix().translate(x,y,z); // different for each effect
    spriteBatch.getTransformMatrix().scale(0.1f,0.1f,0.1f); //optional
    spriteBatch.begin();

    effect.draw(spriteBatch, delta);

    spriteBatch.end();
    spriteBatch.getTransformMatrix().idt();
}
  • 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-05T11:27:00+00:00Added an answer on June 5, 2026 at 11:27 am

    If your 3D effect is a parallax effect, meaning your particles face the camera perpendicularily, you can indeed set the transformation matrix of the SpriteBatch

    batch.getTransformMatrix().idt().translate(0, 0, z);
    batch.begin();
    ... do your rendering here
    batch.end();
    // reset the matrix, so you can use the batch for other stuff
    batch.idt();
    

    For a perspective effect you’ll also have to use perspective projection. The easiest way to cope with this requirement is to use a PerspectiveCamera instead of an OrthographicCamera.

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

Sidebar

Related Questions

Possible Duplicates: Want to render an image without saving it to disk using PHP
I'm using a QWebPage without a QWebView because I want to render the contents
I want to render the partial view using ajax. When I submit the button,
I want to render a form (fields and includes a submit button) when using
I want to render a splash screen on the iPhone whilst using an Open
I have a bunch of partials that I want to render horizontally, using form-inline
I am using asp.net 3.5 and want to render the contents of a static
I want to render using Richfaces a context menu on left click on a
I want to render a page in grails without a <html> , <head> and
I am using rails 3 with devise and i want to render a special

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.