forked from cgvr/DeltaVR
make NPC character prefab + fix arrow hit detection
This commit is contained in:
@@ -86,7 +86,7 @@ public class ArrowCaster : NetworkBehaviour
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Debug.Log(_hit.transform.name);
|
||||
Debug.Log("Arrow hit transform: " + _hit.transform.name);
|
||||
|
||||
// Once the arrow has stopped flying
|
||||
DisablePhysics();
|
||||
@@ -114,6 +114,8 @@ public class ArrowCaster : NetworkBehaviour
|
||||
private void CheckForHittable(RaycastHit hit)
|
||||
{
|
||||
if (hit.transform.TryGetComponent(out IArrowHittable hittable))
|
||||
{
|
||||
hittable.Hit(_arrow);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user