diff --git a/FreeIva/FreeIva.cs b/FreeIva/FreeIva.cs index 74bc5a7b..ba116807 100644 --- a/FreeIva/FreeIva.cs +++ b/FreeIva/FreeIva.cs @@ -182,9 +182,10 @@ static IEnumerator PostBoardCoroutine(ProtoCrewMember protoCrewMember, Collider if (!KerbalIvaAddon.Instance.buckled) { Vector3 position = matchingHatch.transform.TransformPoint(matchingHatch.inwardsDirection * 0.3f); - Vector3 hatchInwards = matchingHatch.transform.TransformVector(matchingHatch.inwardsDirection); + Vector3 hatchInwards = matchingHatch.transform.TransformDirection(matchingHatch.inwardsDirection); Quaternion rotation = Quaternion.LookRotation(hatchInwards, matchingHatch.internalModel.transform.up); - KerbalIvaAddon.Instance.KerbalIva.transform.SetPositionAndRotation(position, rotation); + KerbalIvaAddon.Instance.KerbalIva.transform.position = position; + KerbalIvaAddon.Instance.KerbalIva.SetCameraOrientation(rotation); } } } diff --git a/FreeIva/KerbalIvaController.cs b/FreeIva/KerbalIvaController.cs index 60504f05..9b069fb2 100644 --- a/FreeIva/KerbalIvaController.cs +++ b/FreeIva/KerbalIvaController.cs @@ -93,7 +93,7 @@ public void OrientToGravity() } } - void SetCameraOrientation(Quaternion rotation) + public void SetCameraOrientation(Quaternion rotation) { if (UseRelativeMovement()) {