mirror of
https://github.com/bevyengine/bevy
synced 2025-02-17 22:48:38 +00:00
# Objective Some new bevy users are unfamiliar with quaternions and have trouble working with rotations in 2D. There has been an [issue](https://github.com/bitshifter/glam-rs/issues/226) raised with glam to add helpers to better support these users, however for now I feel could be better to provide examples of how to do this in Bevy as a starting point for new users. ## Solution I've added a 2d_rotation example which demonstrates 3 different rotation examples to try help get people started: - Rotating and translating a player ship based on keyboard input - An enemy ship type that rotates to face the player ship immediately - An enemy ship type that rotates to face the player at a fixed angular velocity I also have a standalone version of this example here https://github.com/bitshifter/bevy-2d-rotation-example but I think it would be more discoverable if it's included with Bevy.
1.1 KiB
64x64px
1.1 KiB
64x64px
![](/Mirrors/bevy/raw/commit/59863d3e8cf8b5961860242e7e1dc949f64e37b1/assets/textures/simplespace/enemy_A.png)