save position and cam rotation

This commit is contained in:
2026-04-15 21:33:36 -05:00
parent 46ec37309d
commit db47bc3768
12 changed files with 83 additions and 78 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ public class ThrowableHand : Tool
private void Update()
{
if (GameManager.Instance.GetPlayerController() != null)
if (GameManager.Instance.PlayerController != null)
{
SetGroundPlane();
DrawTargetProjection();
@@ -29,10 +29,10 @@ private void SetGroundPlane()
{
if (handGroundPlane == null)
{
handGroundPlane = new Plane(Vector3.up, -GameManager.Instance.GetPlayerController().DougBody.transform.position.y);
handGroundPlane = new Plane(Vector3.up, -GameManager.Instance.PlayerController.DougBody.transform.position.y);
}
handGroundPlane.distance = -GameManager.Instance.GetPlayerController().DougBody.transform.position.y;
handGroundPlane.distance = -GameManager.Instance.PlayerController.DougBody.transform.position.y;
handGroundPlane.normal = Vector3.up;
}
@@ -73,7 +73,7 @@ public override void Use()
newBomb.transform.position = transform.position;
Vector3 direction = transform.forward * throwForce * forceModifier;
direction += GameManager.Instance.GetPlayerController().GetVelocity();
direction += GameManager.Instance.PlayerController.GetVelocity();
direction.y = loft;
newBomb.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);