mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
bone names
This commit is contained in:
parent
b731b7aab1
commit
c58d911bf6
7 changed files with 63 additions and 28 deletions
|
|
@ -252,8 +252,10 @@ fn model_to_model(model: &Model, loader: &Loader, skin: usize) -> CpuModel {
|
|||
|
||||
let transforms = model
|
||||
.bones()
|
||||
.filter(|bone| bone.name == "root")
|
||||
.next()
|
||||
.map(|bone| Mat4::from(cgmath::Quaternion::from(bone.rot)))
|
||||
.fold(Mat4::identity(), |a, b| a * b);
|
||||
.unwrap_or_else(|| Matrix4::identity());
|
||||
|
||||
let geometries = model
|
||||
.meshes()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue