Skip to content

Commit 951712a

Browse files
committed
Added an overlap solver
1 parent 48c3b7b commit 951712a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
namespace Microsoft.MixedReality.Toolkit.SDK.Utilities.Solvers
5+
{
6+
/// <summary>
7+
/// Provides a solver that overlaps with the tracked object.
8+
/// </summary>
9+
public class Overlap : Solver
10+
{
11+
public override void SolverUpdate()
12+
{
13+
GoalPosition = SolverHandler.TransformTarget.position;
14+
GoalRotation = SolverHandler.TransformTarget.rotation;
15+
16+
UpdateWorkingPositionToGoal();
17+
UpdateWorkingRotationToGoal();
18+
}
19+
}
20+
}

Assets/MixedRealityToolkit-SDK/Features/Utilities/Solvers/Overlap.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)