-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Is your feature request related to a problem? Please describe.
It's very useful to have desync detection for things like player positions etc. However if your player positions are Transform or glam::Vec3s or similar this currently requiries implementing Hash for those types, which is perhaps not ideal, as Hash isn't implemented for f32, and even though it's possible to do so (using e.g. to_bits), it is perhaps a bit of a footgun for other code that assumes a more correct Hash implementation
Describe the solution you'd like
I'm not sure exactly how I'd like this solved, but perhaps another trait and/or derive could solve it. I'd essentially just want to do:
#[derive(Reflect, Component, bevy_ggrs::Checksum]
#[reflect(Checksum)]
struct Foo(f32);Describe alternatives you've considered
Maybe this is an issue with bevy_reflect, not sure what #[reflect(hash)] is typically used for outside bevy_ggrs... Maybe this is just the way we have to do it.