Weird warping on character when moving

Godot Version

Godot 4.3

Question

When I was trying to make a window for the player and map scene to be displayed on, I noticed that the player seemed to warp slightly whenever the camera moved. I attached a video of what it looks like. Does anyone know how to stop it from warping?

Seems like a smooth movement. Your last post was about the pixel art, is the warping you mention fractional scaling?

I’m sorry, I’m pretty new to Godot. Could you elaborate on what fractional scaling is?

This article does a good job showing “Standard scaling approaches”, if you are scaling up your pixel art by non-integer (numbers with decimals) then some pixels will be larger than others, this is exacerbated by the player movement.

The solution is usually to force integer scaling in the project settings “display/window/stretch/scale_mode”, not sure if this will work very well for your window system, you may have to explain more about how you set this up if it doesn’t help.

1 Like

Sorry for the late response. I already had Integer scaling on for the game. The window system I made has these four scenes.

The Desktop

Node2D
  â”–â•´CanvasLayer
     â” â•´ColorRect 
     â”–â•´GridContainer
        â”–â•´VBoxContainer
           â” â•´TextureButton
           â”–â•´Camera2D

The VBoxContainer has a script so that whenever the button is pressed, it spawns the window scene as a sibling.

The Window

Window
  â”–â•´SubViewportContainer
     â”–â•´SubViewport
        â”–â•´Node2D (Instantiated Scene of game)

The Game

Node2D
  â” â•´TileMapLayer
  â”–â•´Characterbody2D (Instantiated)

The Player Character

CharacterBody2D
  â” â•´Sprite2D
  â” â•´ColisionShape2D
  â” â•´Camera2D
  â”–â•´Area2D
     â”–â•´ColisionShape2D