Animation 缩放ModelInstance和it';libgdx中的动画
我在动画模型方面遇到了一些问题。我加载一个模型,创建一个modelinstance,然后按如下方式缩放:Animation 缩放ModelInstance和it';libgdx中的动画,animation,model,libgdx,Animation,Model,Libgdx,我在动画模型方面遇到了一些问题。我加载一个模型,创建一个modelinstance,然后按如下方式缩放: for (int i = 0; i < modelInstance.nodes.size; i++) { modelInstance.nodes.get(i).scale.set(axisScale); } modelInstance.calculateTransforms(); 在建模应用程序中进行缩放,并在导出之前烘焙缩放。在你的游戏中缩放几乎从来
for (int i = 0; i < modelInstance.nodes.size; i++) {
modelInstance.nodes.get(i).scale.set(axisScale);
}
modelInstance.calculateTransforms();
在建模应用程序中进行缩放,并在导出之前烘焙缩放。在你的游戏中缩放几乎从来都不是一个好的解决方案。是的。如果可以,我会的。从第三部分得到了模型,我甚至不能在maya中修复它。我花了一整天的时间试图在maya中缩放模型,但它锁定并继承变换和骨骼缩放等。对于没有3d建模培训的人来说,它的方式太复杂了。导出动画切线时,我还会收到一条警告。。我有其他的动画模型。角色模型带有动画,工作正常。所以我猜这些新模型中有一些东西,你能简单解释一下为什么代码中的伸缩是个坏主意吗?我从不在游戏中缩放,只在加载资产时缩放一次
"nodes": [
{
"id": "chest_small",
"scale": [ 0.010000, 0.010000, 0.010000],
"parts": [
{
"meshpartid": "shape1_part1",
"materialid": "smallchest",
"bones": [
{
"node": "chest_medium1:root",
"translation": [-0.000000, -0.000000, -0.000000, 0.000000],
"rotation": [-0.000000, 0.000000, -0.000000, 1.000000],
"scale": [ 1.000000, 1.000000, 1.000000, 0.000000]
},
{
"node": "chest_medium1:chest",
"translation": [-0.000000, 19.035118, -0.000000, 0.000000],
"rotation": [-0.000000, 0.000000, -0.000000, 1.000000],
"scale": [ 1.000000, 1.000000, 1.000000, 0.000000]
}
],
"uvMapping": [[ 0]]
}
],
"children": [
{
"id": "lid",
"parts": [
{
"meshpartid": "shape2_part1",
"materialid": "smallchest",
"bones": [
{
"node": "chest_medium1:hinges",
"translation": [-0.000000, 19.035118, -13.654591, 0.000000],
"rotation": [-0.000000, 0.000000, -0.000000, 1.000000],
"scale": [ 1.000000, 1.000000, 1.000000, 0.000000]
},
{
"node": "chest_medium1:lid",
"translation": [-0.000000, 29.616650, 2.217263, 0.000000],
"rotation": [-0.000000, 0.000000, -0.000000, 1.000000],
"scale": [ 1.000000, 1.000000, 1.000000, 0.000000]
}
],
"uvMapping": [[ 0]]
}
]
},