void ProcessGroupAnimation(Scd_Frame_Group group, List <ScdFlag> flags) { foreach (GameObject go in Groups) { ModelController mc = go.GetComponent <ModelController>(); if (mc.Group.Name == group.group) { if (flags.Contains(ScdFlag.CHANGES_POSITION)) { // TODO: Recreate interp generation so that it does not overcompensate interpolation when adding. /* * In detail: Since we are adding (+=) the new group.position to transform.position, we need to ensure that we don't add every single POSITION * but instead, we add every delta position between frames. This change should be made in the calculations for frames in Scd_Data. * e.g. group.delta_position is essentially a frame-by-frame velocity */ // TODO: Add code here for adding the new group.delta_position to the transform.position } if (flags.Contains(ScdFlag.CHANGES_ROTATION)) { go.transform.rotation = Quaternion.Euler(group.rotation); } if (flags.Contains(ScdFlag.CHANGES_SCALE)) { go.transform.localScale = group.scale; } } } }
void ProcessGroupAnimation(Scd_Frame_Group group, List<ScdFlag> flags) { foreach (GameObject go in Groups) { ModelController mc = go.GetComponent<ModelController>(); if (mc.Group.Name == group.group) { if (flags.Contains(ScdFlag.CHANGES_POSITION)) { // TODO: Recreate interp generation so that it does not overcompensate interpolation when adding. /* In detail: Since we are adding (+=) the new group.position to transform.position, we need to ensure that we don't add every single POSITION but instead, we add every delta position between frames. This change should be made in the calculations for frames in Scd_Data. e.g. group.delta_position is essentially a frame-by-frame velocity */ // TODO: Add code here for adding the new group.delta_position to the transform.position } if (flags.Contains(ScdFlag.CHANGES_ROTATION)) { go.transform.rotation = Quaternion.Euler(group.rotation); } if (flags.Contains(ScdFlag.CHANGES_SCALE)) { go.transform.localScale = group.scale; } } } }