Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Camera Lerp following player causes UI issues

$
0
0

@mrwhisky wrote:

im having some problems with a camera and UI elements "lagging" behind the camera
https://imgur.com/a/cAuOGWp
UI element that follows the camera:
position = new Vector2(GameWorld.camera.Position.X, GameWorld.camera.Position.Y + 400);
camera that follows the player:
camera.Position = new Vector2(MathHelper.Lerp(camera.Position.X, player.Position.X, 0.25f), MathHelper.Lerp(camera.Position.Y, player.Position.Y, 0.25f));
even with no lerp it doesnt work
oh and im talking about the ability bar in the bottom middle of the screen in the gif

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles