Fix World Camera

This commit is contained in:
2022-08-20 15:38:13 -07:00
parent 15a7e16650
commit 349c4dc4b6
26 changed files with 4085 additions and 2158 deletions

View File

@@ -13,12 +13,6 @@ namespace Scampz.GameJam.Assets.Scripts
private float currentHitDistance;
//public bool IsWithinBounds()
//{
// var offsetAngle = Quaternion.AngleAxis(rayCastAngle, transform.right);
// return Physics.Raycast(transform.position, offsetAngle * transform.forward);
//}
public bool IsWithinBounds()
{
var offsetAngleRight = Quaternion.AngleAxis(rayCastAngle, transform.right);

View File

@@ -0,0 +1,21 @@
using UnityEngine;
namespace Scampz.GameJam.Assets.Scripts
{
public class UseGroundChecking : MonoBehaviour
{
[SerializeField]
private bool useGroundChecking;
private void OnTriggerEnter(Collider collider)
{
if (collider.CompareTag("Player"))
{
var playerSpawnController = FindObjectOfType<PlayerSpawnController>();
var player = playerSpawnController.Player;
var rayCaster = player.GetComponent<RayCaster>();
rayCaster.enabled = useGroundChecking;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e569519f096090547aafb2a539705467
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: