Skip to content

Commit

Permalink
feat: add "enabled" for manual toggling objects off/on
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackebein authored Oct 23, 2024
1 parent 75c7cec commit 67cf2cd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Runtime/SetupTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ public void AppendAnimatorControllerParameters(AnimatorController controller)

public void AppendExpressionParameters(VRCExpressionParameters expressionParameters)
{
expressionParameters = Utility.CreateBoolParameterAndAddToExpressionParameters(expressionParameters, "ObjectTracking/tracker/" + name + "/enabled", false, false, false);
foreach (KeyValuePair<string[], int[]> pair in Axes())
{
int accuracy = pair.Value[0];
Expand All @@ -566,15 +567,16 @@ public void AppendExpressionParameters(VRCExpressionParameters expressionParamet

public int GetExpressionParameters()
{
int costs = 0;
int count = 0;
count++; // ObjectTracking/tracker/<NAME>/enabled
foreach (KeyValuePair<string[], int[]> pair in Axes())
{
costs += 1; // L<PX|PY|PZ|RX|RY|RZ>
costs += pair.Value[0] / 8; // R<PX|PY|PZ|RX|RY|RZ>-Byte<0-4>
costs += pair.Value[0] % 8; // R<PX|PY|PZ|RX|RY|RZ>-Bit<0-7>
count += 1; // L<PX|PY|PZ|RX|RY|RZ>
count += pair.Value[0] / 8; // R<PX|PY|PZ|RX|RY|RZ>-Byte<0-4>
count += pair.Value[0] % 8; // R<PX|PY|PZ|RX|RY|RZ>-Bit<0-7>
}

return costs;
return count;
}

public int GetExpressionParameterCosts()
Expand Down

0 comments on commit 67cf2cd

Please sign in to comment.