-
-
Notifications
You must be signed in to change notification settings - Fork 993
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Interaction): rotate transform grab mechanic
The Rotate Transform Grab Mechanic allows an Interactable Object to be rotated around a specified local transform axis between given angle limits. It doesn't use any physics to rotate the object and simply changes the local rotation based on the position of the controller in relation to the circular motion around the object. A couple of reusable methods have been extracted into the SharedMethods script such as the NormalizeValue method which takes a given value and the range and then normalizes the value between `0f` and `1f`. The DividerToMultiplier method takes a value that is to be used as a divider and converts it in to the value to use for the multiplication operation which would result in the same answer. This is helpful as it prevents division by zero errors. The relevant scripts have been updated to utilise these new methods.
- Loading branch information
1 parent
d4901ba
commit a24ae46
Showing
9 changed files
with
736 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.