gdquest-demos / godot-2d-builder

A simulation game demo made in Godot and inspired by Factorio.
MIT License
479 stars 38 forks source link

Viewport issues #10

Open bayou-brogrammer opened 3 years ago

bayou-brogrammer commented 3 years ago

I'm submitting a...

Bug report

What is the current behavior?

The viewport/aspect ratio seems to be messed up with holding blueprints vs. placing them. They are placed correctly, but holding the blueprint it is very off

What is the expected behavior?

Blueprint location matches placed location

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Run the godot folder in simulation_game folder

Other

Other information

  1. I have turned off 2d and expand mode within the stretch settings and this seems to fix the error so it must be some weird offset happening with the game scaling to 2d mode.
  2. Enabling borderless mode also fixes the issue without disabling 2d or expand...
Screen Shot 2021-07-29 at 18 50 48

https://user-images.githubusercontent.com/9278174/127583227-6f3823b9-4aed-4297-96ef-74a0eb238a68.mov

pnadalini commented 3 years ago

Since blueprints have some Godot transformations it might be an issue with the computer it's running on. I have the same issue, but not as far away as your video. As a quick fix, you can create a new POSITION_OFFSET constant in EntityPlacer.gd and use that inside _move_blueprint_in_world function so it will show up correctly, but I don't know if that will have any impact if you export the game