-
-
Save kihira/41c6af32842fe3b249cff37d38894105 to your computer and use it in GitHub Desktop.
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
private void UpdatePosition() | |
{ | |
// Less jittery to manually transform the position then add it as a child of the palm | |
// Palm position isn't in middle of palm, more it floats up and in front of it. not going insane trying to correct for that | |
Vector3 newPos = hand.GetPalmPosition() + hand.GetPalmRotation() * (Vector3.up * 0.1f); | |
transform.position = Vector3.Lerp(transform.position, newPos, Math.Abs(newPos.sqrMagnitude - transform.position.sqrMagnitude)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment