All Questions

Community

E
Emanzi Kamugisha(Emanzi)
posted to: Introduction

In Game Mouse Is Offset

The in-game mouse in the finished example project does not work properly and its like when you try to select anything from the inventory, everything is offset by a-lot making it difficult to understand exactly where you are placing objects.

mouse_offset.png

I'm guessing this is an issue with the games resolution set to expand with the window? But setting it to keep did not solve the problem. Not sure if you can get this fixed because it's a persistent issue throughout this course making the game unplayable in general.

 

  • Razoric replied

    This is unfortunately a bug in Godot where CanvasLayers don't get the memo that the viewport has been resized. The only way to work around it was by putting the DragPreview back to be a child of EntityPlacer and setting its position directly without the call to xform, instead of putting it in the GUI. Unfortunately, that means the number label can't follow it properly, and there's a lot of knock-on bugs. I've spent quite a few hours on it and just never found a workaround that solved all issues =\


  • E
    Emanzi Kamugisha(Emanzi) replied

    Hmmm hopefully it will get fixed in Godot. I think otherwise I'll just follow along the videos for the theory of Entity Component Systems.