mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
DebugTeleportInfoMessage: use WarpToPositionRotation
This commit is contained in:
parent
22b770ff7f
commit
01332e3ad2
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user