How to call Camera::world_to_screen()? #4640
-
In bevy 0.6.0, I was converting from world space to screen space using something like: fn my_system(windows: Res<Windows>, camera_query: Query<(&Camera, &GlobalTransform)>) {
if let Some((camera, cam_trans)) = camera_query.iter().next() {
// ...
let screen_point = camera.world_to_screen(&windows, &cam_trans, world_point);
// ...
}
} But in 0.7.0, I can't figure out where I might get this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can fetch |
Beta Was this translation helpful? Give feedback.
-
Thanks! finally got back to this now, just to expand on your answer slightly: I added |
Beta Was this translation helpful? Give feedback.
You can fetch
Assets
from theWorld
as a resource. The standard asset collections (likeImage
) are initialized by theDefaultPlugins
.