bevy/crates/bevy_transform/src
Jonathan ec3e7afa4e
Use Dir3 in Transform APIs (#12530)
# Objective

Make `Transform` APIs more ergonomic by allowing users to pass `Dir3` as
an argument where a direction is needed. Fixes #12481.

## Solution

Accept `impl TryInto<Dir3>` instead of `Vec3` for direction/axis
arguments in `Transform` APIs

---

## Changelog
The following `Transform` methods now accept an `impl TryInto<Dir3>`
argument where they previously accepted directions as `Vec3`:
* `Transform::{look_to,looking_to}`
* `Transform::{look_at,looking_at}`
* `Transform::{align,aligned_by}`


## Migration Guide

This is not a breaking change since the arguments were previously `Vec3`
which already implements `TryInto<Dir3>`, and behavior is unchanged.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: IQuick 143 <IQuick143cz@gmail.com>
2024-03-17 16:31:34 +00:00
..
components Use Dir3 in Transform APIs (#12530) 2024-03-17 16:31:34 +00:00
commands.rs Move commands module into bevy::ecs::world (#12234) 2024-03-02 23:13:45 +00:00
helper.rs Derive Error for more error types (#10240) 2023-10-28 22:20:37 +00:00
lib.rs Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
systems.rs Move commands module into bevy::ecs::world (#12234) 2024-03-02 23:13:45 +00:00