mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
fix view offset
This commit is contained in:
parent
467c889cc3
commit
1d8a63f99f
1 changed files with 4 additions and 4 deletions
|
|
@ -249,13 +249,13 @@ fn model_to_mesh(model: &Model) -> CpuMesh {
|
||||||
let offset = model
|
let offset = model
|
||||||
.vertices()
|
.vertices()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|vert| vert.position.z)
|
.map(|vert| vert.position.y)
|
||||||
.max_by(|a, b| a.partial_cmp(b).unwrap())
|
.max_by(|a, b| a.total_cmp(b))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let offset = Vector {
|
let offset = Vector {
|
||||||
x: 0.0,
|
x: 0.0,
|
||||||
y: 0.0,
|
y: -offset / 2.0,
|
||||||
z: -offset / 2.0,
|
z: 0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
let positions: Vec<Vec3> = model
|
let positions: Vec<Vec3> = model
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue