mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Fix glTF reader not ignoring parent transforms for skinned meshes
This commit is contained in:
		
				
					committed by
					
						
						Lars Müller
					
				
			
			
				
	
			
			
			
						parent
						
							0d414c44da
						
					
				
				
					commit
					5113fcaedd
				
			@@ -426,7 +426,10 @@ void SelfType::MeshExtractor::addPrimitive(
 | 
			
		||||
		throw std::runtime_error("too many vertices");
 | 
			
		||||
 | 
			
		||||
	// Apply the global transform along the parent chain.
 | 
			
		||||
	transformVertices(*vertices, parent->GlobalMatrix);
 | 
			
		||||
	// "Only the joint transforms are applied to the skinned mesh;
 | 
			
		||||
	// the transform of the skinned mesh node MUST be ignored."
 | 
			
		||||
	if (!skinIdx)
 | 
			
		||||
		transformVertices(*vertices, parent->GlobalMatrix);
 | 
			
		||||
 | 
			
		||||
	auto maybeIndices = getIndices(primitive);
 | 
			
		||||
	std::vector<u16> indices;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user