Untitled
unknown
d
3 years ago
1.1 kB
10
Indexable
uint[string] boneMap;
for (int i = 0; i < test.boneCount; i++) {
BoneInfo blah = test.bones[i];
string boneName;
foreach (character; blah.name) {
if (character == cast(char)"\0") {
break;
}
boneName ~= character;
}
boneMap[boneName] = i;
}
// writeln(boneMap["neck"]);
/// This is an animation frame
Transform* animationCell = &testAnimation.framePoses[0][boneMap["chest"]];
writeln(accumulator);
if (accumulator > 3.14) {
accumulator = -3.14;
}
Quaternion goal = QuaternionFromEuler(accumulator,0,0);
animationCell.rotation = goal;
// This is direct position manipulation
testAnimation.framePoses[0][boneMap["neck"]].translation.y = 5;Editor is loading...