java - Camera moving along with the background out of sync in LIBGDX -


I have a phantom that I am running around the world; When the user touches the screen, its velocity has increased based on its constant acceleration. I also transferred the camera with this Phantom; But I also have a BG image which needs to be still on the screen so that the camera moves with the exact speed and acceleration in the form of the background image so that it looks like the background is still though, I am between the camera and the background image Looking a little bit from synchronization; Background should still be, but it is not:

  @ Override Public Zero Render () {Batch.SetprogressMatics (camera.combined); World_velocity + = Acceleration; Back.setPosition (back.getX), back.getY () + world_velocity); Camera.position.y + = world_velocity; Camera.update (); }  

How can I sync a Bg image with the camera so that the BG image still persists? Note: If I use constant velocity (no update on acceleration), then there is no problem.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -