The game resizes the player?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By occultnix

As it says in the subject, it seems like Godot 4.0.3 is resizing my player in-game for some reason.

The scene is set up with a bunch of nodes - mostly Node2Ds housing Sprite2Ds and CollisionShape2Ds - as well as the player - a RigidBody2D with a Sprite2D and CollisionShape2D. The player sprite is 40px x 40px, but once in-game it appears about half that size.

Deleting the player and re-creating the structure without a script does not seem to fix the issue either. I’m at a loss for what’s causing this?

Resizing in effect
The player scene and script

:bust_in_silhouette: Reply From: Nickyroo

This might be an answer too simple, But have you checked your Camera2D’s fov/size?

Camera zoom and scale are both (1,1). If there’s another setting for field of view or size, I haven’t found it.

If it helps, the player is the only thing that seems to be resized. Everything else is appropriately proportionate. Nothing’s on different collision or masking layers (yet) either.

occultnix | 2023-06-04 00:43

I dont know if you have known of this, But there is a feature in Godot to study and Visually Debug a Live version of your Scene…

Notice on the Top Left of your Godot Project Page, do you see that Scene Tab?.. When you Run your game, you have “Local”, and “Remote” option for viewing… if you press on Remote when your game Runs… You will view a Live Heiarchy of your Scene… You can Go through your Scene Paths to reach your Player, and Have a better Debugging/Understanding, of What exactly is being Shrunk, Or the Causes of it.

Also if your Using transform or global_transform for your moving Platforms, which could be connected with your player somehow (I dont know for sure)… It is possible that it could be changing your Position, Rotation, And also even your Scale, To the Default Vector2(1, 1)

I would reccomend to Check your Sprite and your Player/Rigidbody to figure out which is Shrinking through the Remote View

Nickyroo | 2023-06-04 01:56