Skip to content

Commit

Permalink
Add a function for computing a world point from a screen point
Browse files Browse the repository at this point in the history
  • Loading branch information
anchpop committed May 17, 2021
1 parent 50c74e5 commit 7b61246
Show file tree
Hide file tree
Showing 14 changed files with 690 additions and 72 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,19 @@ path = "examples/2d/text2d.rs"
name = "texture_atlas"
path = "examples/2d/texture_atlas.rs"

[[example]]
name = "mouse_tracking"
path = "examples/2d/mouse_tracking.rs"

# 3D Rendering
[[example]]
name = "3d_scene"
path = "examples/3d/3d_scene.rs"

[[example]]
name = "screen_to_world"
path = "examples/3d/screen_to_world.rs"

[[example]]
name = "load_gltf"
path = "examples/3d/load_gltf.rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl<'w, T: Component> AsRef<T> for ResMut<'w, T> {

impl<'w, T: Component> AsMut<T> for ResMut<'w, T> {
fn as_mut(&mut self) -> &mut T {
self.deref_mut()
&mut *self
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/world/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<'w, T> AsRef<T> for Mut<'w, T> {

impl<'w, T> AsMut<T> for Mut<'w, T> {
fn as_mut(&mut self) -> &mut T {
self.deref_mut()
&mut *self
}
}

Expand Down
15 changes: 15 additions & 0 deletions crates/bevy_geometry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "bevy_geometry"
version = "0.5.0"
authors = [
"Bevy Contributors <bevyengine@gmail.com>",
"Aevyrie Roessler <aevyrie@gmail.com>",
]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_transform = { path = "../bevy_transform", version = "0.5.0" }
bevy_math = { path = "../bevy_math", version = "0.5.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", features = ["bevy"] }
Loading

0 comments on commit 7b61246

Please sign in to comment.