diff --git a/src/model_physics.rs b/src/model_physics.rs index 7ca4256..566c507 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -462,7 +462,7 @@ pub struct TransformedMesh<'a>{ transform:&'a PhysicsMeshTransform, } impl TransformedMesh<'_>{ - pub fn new<'a>( + pub const fn new<'a>( view:PhysicsMeshView<'a>, transform:&'a PhysicsMeshTransform, )->TransformedMesh<'a>{ diff --git a/src/physics.rs b/src/physics.rs index 9caf231..0c5d325 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -419,7 +419,7 @@ impl HitboxMesh{ } } #[inline] - fn transformed_mesh(&self)->TransformedMesh{ + const fn transformed_mesh(&self)->TransformedMesh{ TransformedMesh::new(self.mesh.complete_mesh_view(),&self.transform) } }