DebugTeleportInfoMessage: use WarpToPositionRotation

This commit is contained in:
JohnCorby 2022-03-11 03:32:52 -08:00
parent 22b770ff7f
commit 01332e3ad2

View File

@ -71,10 +71,12 @@ public class DebugTeleportInfoMessage : QSBMessage
var refBody = qsbSector.AttachedObject.GetOWRigidbody();
var pos = refBody.transform.FromRelPos(RelPos);
body.SetPosition(pos);
body.SetRotation(refBody.transform.FromRelRot(RelRot));
body.WarpToPositionRotation(
pos,
refBody.transform.FromRelRot(RelRot)
);
Locator.GetPlayerCameraController().SetDegreesY(DegreesY);
body.SetVelocity(refBody.FromRelVel(RelVel, pos));
body.SetAngularVelocity(refBody.FromRelAngVel(RelAngVel));
}
}
}