diff --git a/lib/roblox_emulator/src/runner/cframe.rs b/lib/roblox_emulator/src/runner/cframe.rs index fa606228..62e3b7de 100644 --- a/lib/roblox_emulator/src/runner/cframe.rs +++ b/lib/roblox_emulator/src/runner/cframe.rs @@ -4,7 +4,7 @@ use super::number::Number; use super::vector3::Vector3; #[derive(Clone,Copy)] -pub struct CFrame(pub(crate)glam::Affine3A); +pub struct CFrame(glam::Affine3A); impl CFrame{ pub fn new( @@ -37,14 +37,14 @@ fn vec3_from_glam(v:rbx_types::Vector3)->glam::Vec3A{ glam::vec3a(v.x,v.y,v.z) } -impl Into for CFrame{ - fn into(self)->rbx_types::CFrame{ +impl From for rbx_types::CFrame{ + fn from(CFrame(cf):CFrame)->rbx_types::CFrame{ rbx_types::CFrame::new( - vec3_to_glam(self.0.translation), + vec3_to_glam(cf.translation), rbx_types::Matrix3::new( - vec3_to_glam(self.0.matrix3.x_axis), - vec3_to_glam(self.0.matrix3.y_axis), - vec3_to_glam(self.0.matrix3.z_axis), + vec3_to_glam(cf.matrix3.x_axis), + vec3_to_glam(cf.matrix3.y_axis), + vec3_to_glam(cf.matrix3.z_axis), ) ) }