mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Fix handling of skinned meshes for nodes
- Rigidly animated models (e.g. the gltf frog node) were not working correctly, since cloning the mesh ignored the transformation matrices. Note that scaling the mesh needs to occur *after* transforming the vertices. - Visual scale did not apply to skinned models, as resetting the animation overwrote scaled vertex data with static positions & normals. For backwards compatibility, we only apply a 10x scale to static (.obj) models.
This commit is contained in:
parent
57c1ab905c
commit
612db5b2ca
6 changed files with 72 additions and 65 deletions
|
@ -1676,7 +1676,7 @@ void MapblockMeshGenerator::drawMeshNode()
|
|||
|
||||
if (cur_node.f->mesh_ptr) {
|
||||
// clone and rotate mesh
|
||||
mesh = cloneMesh(cur_node.f->mesh_ptr);
|
||||
mesh = cloneStaticMesh(cur_node.f->mesh_ptr);
|
||||
bool modified = true;
|
||||
if (facedir)
|
||||
rotateMeshBy6dFacedir(mesh, facedir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue