Skip to content

Commit 019bf1c

Browse files
committed
fix fbx import weirdness
1 parent e14f686 commit 019bf1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/io/BinIO.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ namespace BIN {
10841084
Model mdl;
10851085

10861086
ufbx_load_opts opts = {};
1087-
opts.target_axes = ufbx_axes_right_handed_y_up;
1088-
opts.target_unit_meters = 0.01f;
1087+
opts.target_axes = ufbx_axes_left_handed_y_up;
1088+
opts.target_unit_meters = 1.0f;
10891089
ufbx_scene* scene = ufbx_load_file(path.c_str(), &opts, nullptr);
10901090

10911091
// set up resources per node
@@ -1154,7 +1154,7 @@ namespace BIN {
11541154
uint32_t index = triIndices[i];
11551155

11561156
Vertex v;
1157-
v.Position = { mesh->vertex_position[index].x, mesh->vertex_position[index].y, mesh->vertex_position[index].z };
1157+
v.Position = { mesh->vertex_position[index].x*100, mesh->vertex_position[index].y*100, mesh->vertex_position[index].z*100 };
11581158
v.Normal = { mesh->vertex_normal[index].x, mesh->vertex_normal[index].y, mesh->vertex_normal[index].z };
11591159
v.Texcoord = { mesh->vertex_uv[index].x, mesh->vertex_uv[index].y };
11601160
vertices.push_back(v);

0 commit comments

Comments
 (0)