NaN when looking_at
is called with Transform
's origin as target
#3736
Labels
A-Math
Fundamental domain-agnostic mathematical operations
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
Bevy version
0.5 and 0.6
Operating system & version
Linux Mint 20.2
What you did
I modified the 3D Scene example so line 42 read as,
transform: Transform::from_xyz(0.0, 0.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y),
As you can see, the origin of the transform is the same as where it's set to look.
What you expected to happen
Default to either current Quat or the unit matrix.
What actually happened
Printing the debug value of that particular transform produced,
Mut(Transform { translation: Vec3(NaN, NaN, NaN), rotation: Quat(NaN, NaN, NaN, NaN), scale: Vec3(1.0, 1.0, 1.0) })
and attempting to further modify it resulted in no change (as expected, given what's happening).
Additional information
The text was updated successfully, but these errors were encountered: