vault backup: 2024-10-09 19:16:48
This commit is contained in:
parent
2c3ed32222
commit
bc22d48a4f
@ -667,6 +667,7 @@ fn CalculateAddRotation index =
|
|||||||
//导入AdditiveAnim
|
//导入AdditiveAnim
|
||||||
importFile Anims[index].Address #noPrompt using:Wavefront_Object
|
importFile Anims[index].Address #noPrompt using:Wavefront_Object
|
||||||
local bones = FindAllBones()
|
local bones = FindAllBones()
|
||||||
|
//清空数组
|
||||||
BoneRotationArray = #()
|
BoneRotationArray = #()
|
||||||
|
|
||||||
//遍历骨骼,从第二根骨骼,也就是Pelvis开始。(仅仅针对UE骨骼,Bip得重新考虑)
|
//遍历骨骼,从第二根骨骼,也就是Pelvis开始。(仅仅针对UE骨骼,Bip得重新考虑)
|
||||||
@ -678,7 +679,7 @@ fn CalculateAddRotation index =
|
|||||||
local Value_X = ((at time 0 bones[j].rotInParent).x - (at time 0 bones[j].parent.rotInParent).x)
|
local Value_X = ((at time 0 bones[j].rotInParent).x - (at time 0 bones[j].parent.rotInParent).x)
|
||||||
local Value_Y = ((at time 0 bones[j].rotInParent).y - (at time 0 bones[j].parent.rotInParent).y)
|
local Value_Y = ((at time 0 bones[j].rotInParent).y - (at time 0 bones[j].parent.rotInParent).y)
|
||||||
local Value_Z = ((at time 0 bones[j].rotInParent).z - (at time 0 bones[j].parent.rotInParent).z)
|
local Value_Z = ((at time 0 bones[j].rotInParent).z - (at time 0 bones[j].parent.rotInParent).z)
|
||||||
//针对XYZ抖动情况的不同传入不同的形参并调用BoneRotationArray。
|
//针对XYZ情况的不同,将数据存入BoneRotationArray数组。
|
||||||
if (abs Value_X) > 0.05 then
|
if (abs Value_X) > 0.05 then
|
||||||
(
|
(
|
||||||
if (abs Value_Y) > 0.05 then
|
if (abs Value_Y) > 0.05 then
|
||||||
@ -761,3 +762,25 @@ fn CalculateAddRotation index =
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
RotationBone():
|
||||||
|
```c++
|
||||||
|
fn RotationBone X Y Z BoneArray Map BaseAnimBones =
|
||||||
|
(
|
||||||
|
local RotationValue = 0
|
||||||
|
for a=1 to BoneArray.count do
|
||||||
|
(
|
||||||
|
case Map of
|
||||||
|
(
|
||||||
|
1:(RotationValue = BoneArray[a].ValueX)
|
||||||
|
2:(RotationValue = BoneArray[a].ValueY)
|
||||||
|
3:(RotationValue = BoneArray[a].ValueZ)
|
||||||
|
4:(RotationValue = (BoneArray[a].ValueX)*(-1))
|
||||||
|
5:(RotationValue = (BoneArray[a].ValueY)*(-1))
|
||||||
|
6:(RotationValue = (BoneArray[a].ValueZ)*(-1))
|
||||||
|
--default:(RotationValue = BoneRotationArray[a].ValueX)
|
||||||
|
)
|
||||||
|
in coordsys world rotate BaseAnimBones[(BoneArray[a].Index)] (EulerAngles (RotationValue*X) (RotationValue*Y) (RotationValue*Z))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user