save position and cam rotation
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user