summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-19 23:12:08 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-19 23:12:08 +0100
commitdf38d65acb939a363d44faf475632b06d56a936e (patch)
tree57ad36674eab87333eac4aa42756790c0aa986e7
parentee198b516bad5db9312dde3749bf864d6c7079b1 (diff)
downloadweareserver-df38d65acb939a363d44faf475632b06d56a936e.tar
weareserver-df38d65acb939a363d44faf475632b06d56a936e.tar.bz2
weareserver-df38d65acb939a363d44faf475632b06d56a936e.tar.zst
fix bugs
-rw-r--r--shared/src/resources.rs2
-rw-r--r--world/src/main.rs19
2 files changed, 12 insertions, 9 deletions
diff --git a/shared/src/resources.rs b/shared/src/resources.rs
index bab9a43..4460feb 100644
--- a/shared/src/resources.rs
+++ b/shared/src/resources.rs
@@ -80,7 +80,7 @@ resource_dicts!(
light[multi]: (Vec3A, Resource<LightPart>),
armature[multi]: Resource<ArmaturePart>,
particles[multi]: (Affine3A, Resource<ParticlesPart>),
- animations[multi]: Resource<AnimationPart>,
+ animation[multi]: Resource<AnimationPart>,
avatar_info: Resource<AvatarInfoPart>,
environment: Resource<EnvironmentPart>,
}
diff --git a/world/src/main.rs b/world/src/main.rs
index 53489f3..1b863bb 100644
--- a/world/src/main.rs
+++ b/world/src/main.rs
@@ -305,11 +305,11 @@ fn main() -> Result<()> {
velocity_spread: attr.velocity_spread,
})?;
- prefab
- .lock()
- .unwrap()
- .particles
- .push((transform_to_affine(node.transform()), part));
+ // prefab
+ // .lock()
+ // .unwrap()
+ // .particles
+ // .push((transform_to_affine(node.transform()), part));
}
if let Some(light) = node.light() {
@@ -335,7 +335,10 @@ fn main() -> Result<()> {
.light
.push((Vec3A::from_array(position), part));
}
- import_physics(&gltf, *trans, node, &store, &buffers)?;
+ {
+ let collider = import_physics(&gltf, *trans, node, &store, &buffers)?;
+ prefab.lock().unwrap().collision.extend(collider);
+ }
Ok::<_, anyhow::Error>(())
})
@@ -383,7 +386,7 @@ fn main() -> Result<()> {
ch.time = Some(time.clone());
ch.value = Some(value.clone());
debug!(
- "animation channel {:?} of mesh {m} with {} times and {} component values",
+ "animation channel {:?} of mesh {m} with {} time and {} component values",
c.target().property(),
inputs.len(),
outputs.len()
@@ -392,7 +395,7 @@ fn main() -> Result<()> {
}
}
info!("adding animation with {} channels", channels.len());
- prefab.animations.push(store.set(&AnimationPart {
+ prefab.animation.push(store.set(&AnimationPart {
name: a.name().map(|n| n.to_string()),
channel: channels,
duration: Some(max_time),