diff options
-rw-r--r-- | shared/src/resources.rs | 2 | ||||
-rw-r--r-- | world/src/main.rs | 19 |
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), |