darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
https://comfyengine.org
Apache License 2.0
717 stars 35 forks source link

Fix double-borrow issue in camera.rs #55

Closed setzer22 closed 11 months ago

setzer22 commented 11 months ago

The code was calling main_camera() by mistake when it should've been using self. This works if you're using main_camera().world_to_screen(), but if you hold a main_camera_mut() then it panics.

darthdeus commented 11 months ago

Thanks!