Hello,
I’m experimenting with the AnimatedModel sample where there is a knight fbx model that has a well structured skeleton.Now I want to rotate knight’s arm from code.I have edited the RotateEntity.cs script and changed the code that now looks like this:
`
var modelComponent = Entity.Get();
var transformComponent = Entity.Get();
var mvhto = new ModelViewHierarchyTransformOperation(modelComponent);
foreach (var mesh in modelComponent.Model.Meshes)
{
var nodeIndex = mesh.NodeIndex;
if(mesh.Name.Contains("Arm"))
{
var node1 = modelComponent.Skeleton.Nodes[nodeIndex];
node1.Transform.Rotation *= Quaternion.RotationY(rotationSpeed * elapsedTime);
mvhto.Process(transformComponent);
}
}`
But the problem is that nothing is moving in the runtime. I have also tried with fixed angle,translate,different knight’s parts with no success.
Please help.Thanks.