frederickjjoubert / bevy-ball-game

This is a small game I made to teach the basics of the Bevy Game Engine
https://bevyengine.org
MIT License
78 stars 16 forks source link

confine_player_movement() does not work correctly when the width or height of the game window is changed #2

Closed chrischtel closed 1 year ago

chrischtel commented 1 year ago

When you change the width of the game window, the "border" moves further out or in. The same applies to the height.

Adamkob12 commented 1 year ago

check out this article: https://www.mikechambers.com/blog/2022/10/30/managing-window-size-in-bevy/ You could also send out an WindowResized event to handle it your own way.

chrischtel commented 1 year ago

Okay thanks that worked for me. :)