You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going to close this as addressing it will require rewriting glam internals which is covered by #177. Note that types backed by SIMD such as Vec3A, Vec4, Quat and Mat2 would still require Deref so it will never completely go away but Vec3 and Vec2 could avoid it if code generation is changed.
Bevy users routinely report confusing, frustrating errors with terrible compiler messages when attempting to do basic operations on transforms.
For example, this code fails:
With the following error message:
This can be solved by removing the
*
dereferences from that line.Tracing the root of this problem, we encounter a Deref and DerefMut implementation of
Vec3
toXYZ
.By changing this conversion to be explicit, rather than (mis)using
Deref
, we can dramatically improve the user experience and error messages.The text was updated successfully, but these errors were encountered: