bevy/examples/transforms
Rose Hudson d6f1649646
return Direction3d from Transform::up and friends (#11604)
# Objective
Drawing a `Gizmos::circle` whose normal is derived from a Transform's
local axes now requires converting a Vec3 to a Direction3d and
unwrapping the result, and I think we shold move the conversion into
Bevy.

## Solution
We can make
`Transform::{left,right,up,down,forward,back,local_x,local_y,local_z}`
return a Direction3d, because they know that their results will be of
finite non-zero length (roughly 1.0).

---

## Changelog
`Transform::up()` and similar functions now return `Direction3d` instead
of `Vec3`.

## Migration Guide
Callers of `Transform::up()` and similar functions may have to
dereference the returned `Direction3d` to get to the inner `Vec3`.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
2024-02-02 15:05:35 +00:00
..
3d_rotation.rs Exposure settings (adopted) (#11347) 2024-01-16 14:53:21 +00:00
scale.rs Exposure settings (adopted) (#11347) 2024-01-16 14:53:21 +00:00
transform.rs return Direction3d from Transform::up and friends (#11604) 2024-02-02 15:05:35 +00:00
translation.rs Exposure settings (adopted) (#11347) 2024-01-16 14:53:21 +00:00