Renamed v2 camera ray procs and added auto normalization of screen coords

This commit is contained in:
2025-07-03 22:54:10 +02:00
parent 2408c03579
commit eb5121802f
3 changed files with 8 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
#load "../ui/widgets.jai";
pick_scene_view_at :: (camera: Camera, coordinates: Vector2) {
ray := normalized_screen_to_ray_v2(camera, coordinates);
ray := normalized_screen_to_ray(camera, coordinates);
if engine.editor.should_check_entities {
hit_entity : *Entity;
@@ -182,7 +182,7 @@ base_editor_update :: () {
coordinates.y = 1.0 - coordinates.y;
//coordinates := Vector2.{engine.editor.mouse_viewport_state.normalized_local_mouse_coordinates.x, 1.0 - engine.editor.mouse_viewport_state.normalized_local_mouse_coordinates.y};
ray := normalized_screen_to_ray_v2(engine.editor.camera, coordinates);
ray := normalized_screen_to_ray(engine.editor.camera, coordinates);
if !blocking_input {
if update_transform_gizmo(ray, coordinates) {