MorphWeights
MorphWeights
- weights : alloc::vec::Vec
- first_mesh : core::option::Option<bevy_asset::handle::Handle<bevy_mesh::mesh::Mesh>>
Description
Controls the morph targets for all child
Mesh3d
entities. In most cases, [MorphWeights
] should be considered the "source of truth" when writing morph targets for meshes. However you can choose to write child [MeshMorphWeights
] if your situation requires more granularity. Just note that if you set [MorphWeights
], it will overwrite child [MeshMorphWeights
] values.This exists because Bevy's [
Mesh
] corresponds to a single surface / material, whereas morph targets as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material). Therefore in Bevy [MorphWeights
] an a parent entity are the "canonical weights" from a GLTF perspective, which then synchronized to childMesh3d
/ [MeshMorphWeights
] (which correspond to "primitives" / "surfaces" from a GLTF perspective).Add this to the parent of one or more
Entities
with aMesh3d
with a [MeshMorphWeights
].