# Objective Fixes #6378 `bevy_transform` is missing a feature corresponding to the `serialize` feature on the `bevy` crate. ## Solution Adds a `serialize` feature to `bevy_transform`. Derives `serde::Serialize` and `Deserialize` when feature is enabled.
12 lines
354 B
Rust
12 lines
354 B
Rust
use crate::Vec3;
|
|
|
|
/// A ray is an infinite line starting at `origin`, going in `direction`.
|
|
#[derive(Default, Clone, Copy, Debug, PartialEq)]
|
|
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
|
|
pub struct Ray {
|
|
/// The origin of the ray.
|
|
pub origin: Vec3,
|
|
/// The direction of the ray.
|
|
pub direction: Vec3,
|
|
}
|