summaryrefslogtreecommitdiff
path: root/world/src/physics.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-12 12:08:56 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-12 12:08:56 +0100
commit7121bb7c49fcf5b24795c77100cb1ff46097ecb6 (patch)
tree8a8ea6cbbca75a8aa8e0394d07cfe4a3a0817e94 /world/src/physics.rs
parentc626006c767f21d1ba0d452b64e244c7d69fa09b (diff)
downloadweareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar
weareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar.bz2
weareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar.zst
add scale and z_up arguments
Diffstat (limited to 'world/src/physics.rs')
-rw-r--r--world/src/physics.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/world/src/physics.rs b/world/src/physics.rs
index 3b98378..4afeab7 100644
--- a/world/src/physics.rs
+++ b/world/src/physics.rs
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-use crate::mesh::node_transform_to_affine;
+use crate::{Args, mesh::node_transform_to_affine};
use anyhow::{Result, anyhow};
use gltf::{Gltf, Node, buffer::Data, json::Value};
use log::info;
@@ -30,6 +30,7 @@ pub fn import_physics(
prefab: &mut Prefab,
store: &ResourceStore,
buffers: &[Data],
+ args: &Args,
) -> Result<()> {
if let Some(physics) = node
.extensions()
@@ -72,7 +73,7 @@ pub fn import_physics(
);
prefab.collision.push((
- node_transform_to_affine(&node),
+ node_transform_to_affine(&node, args),
store.set(&CollisionPart {
sh_mesh: Some((store.set(&index)?, store.set(&position)?)),
..Default::default()