From 3b7a1d5dff5d93aea2c117880829e5a1628cc070 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 11 Oct 2023 22:16:19 -0700 Subject: [PATCH] implement ModelPhysics --- src/physics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics.rs b/src/physics.rs index 7fe0033..35df753 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -332,12 +332,12 @@ pub struct ModelPhysics { //A model is a thing that has a hitbox. can be represented by a list of TreyMesh-es //in this iteration, all it needs is extents. mesh: TreyMesh, - transform:glam::Affine3A, + transform:crate::integer::Planar64Affine3, attributes:PhysicsCollisionAttributes, } impl ModelPhysics { - fn from_model_transform_attributes(model:&crate::model::IndexedModel,transform:&glam::Affine3A,attributes:PhysicsCollisionAttributes)->Self{ + fn from_model_transform_attributes(model:&crate::model::IndexedModel,transform:&crate::integer::Planar64Affine3,attributes:PhysicsCollisionAttributes)->Self{ let mut aabb=TreyMesh::default(); for indexed_vertex in &model.unique_vertices { aabb.grow(transform.transform_point3(Planar64Vec3::from_array(model.unique_pos[indexed_vertex.pos as usize])));