Commit 9d83e9a6 authored by LasseKau's avatar LasseKau
Browse files

update

-
parent 7dc1fc67
......@@ -180,6 +180,8 @@ public class Rifle : MonoBehaviour
RaycastHit hit;
if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
{
Debug.Log(hit.transform.name);
Debug.DrawLine(this.fpsCam.transform.position, this.fpsCam.transform.position + this.fpsCam.transform.forward, Color.red);
Target target = hit.transform.GetComponent<Target>();
BearTrap bearTrap = hit.transform.GetComponent<BearTrap>();
EnemyPhysics enemy = hit.transform.GetComponent<EnemyPhysics>();
......
......@@ -96,6 +96,7 @@ public class Weapon : MonoBehaviour
RaycastHit hit;
if (Physics.Raycast(fpsCam.transform.position, direction, out hit, range))
{
Debug.Log(hit.transform.name);
Target target = hit.transform.GetComponent<Target>();
BearTrap bearTrap = hit.transform.GetComponent<BearTrap>();
EnemyPhysics enemy = hit.transform.GetComponent<EnemyPhysics>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment