mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 07:19:22 +00:00
[DesktopVRIK] Fixes for 2023r172.
This commit is contained in:
parent
c7eb5715ba
commit
df53840a63
6 changed files with 27 additions and 13 deletions
|
@ -48,12 +48,15 @@ internal abstract class IKHandler
|
|||
{
|
||||
Vector3 currentPosition = currentParent._referencePoint.position;
|
||||
Quaternion currentRotation = Quaternion.Euler(0f, currentParent.transform.rotation.eulerAngles.y, 0f);
|
||||
|
||||
Vector3 deltaPosition = currentPosition - _movementPosition;
|
||||
Quaternion deltaRotation = Quaternion.Inverse(_movementRotation) * currentRotation;
|
||||
|
||||
if (_movementParent == currentParent)
|
||||
|
||||
if (_movementParent != null && _movementParent == currentParent)
|
||||
{
|
||||
Vector3 deltaPosition = currentPosition - _movementPosition;
|
||||
Quaternion deltaRotation = Quaternion.identity;
|
||||
|
||||
if (currentParent.orientationMode == CVRMovementParent.OrientationMode.RotateWithParent)
|
||||
deltaRotation = Quaternion.Inverse(_movementRotation) * currentRotation;
|
||||
|
||||
_solver.AddPlatformMotion(deltaPosition, deltaRotation, platformPivot);
|
||||
_ikSimulatedRootAngle = Mathf.Repeat(_ikSimulatedRootAngle + deltaRotation.eulerAngles.y, 360f);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ public class IKManager : MonoBehaviour
|
|||
// Player Info
|
||||
internal Transform _desktopCamera;
|
||||
internal Transform _vrCamera;
|
||||
private bool _isEmotePlaying;
|
||||
|
||||
// Avatar Info
|
||||
private Animator _animator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue