Cannot Grapple Spikes anymore
This commit is contained in:
parent
b3a56f79bd
commit
1c8c15c7ef
@ -92,14 +92,26 @@ public class GrappleHook : MonoBehaviour
|
||||
hitMarkerRect.anchoredPosition = WorldToUI(gameObject.transform.position + aimDir * maxGrappleDist);
|
||||
|
||||
if (Physics.Raycast(gameObject.transform.position, aimDir, out hit, maxGrappleDist, grappleableLayer)) {
|
||||
if (hit.transform.gameObject.layer != 7)
|
||||
{
|
||||
hitMarkerRect.anchoredPosition = WorldToUI(hit.point);
|
||||
hitMarkerRect.gameObject.GetComponent<Image>().color = Color.green;
|
||||
|
||||
if(grappling){
|
||||
if (grappling)
|
||||
{
|
||||
StartGrapple(hit);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
grappling = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hitMarkerRect.anchoredPosition = WorldToUI(hit.point);
|
||||
hitMarkerRect.gameObject.GetComponent<Image>().color = Color.red;
|
||||
}
|
||||
|
||||
}else{
|
||||
hitMarkerRect.gameObject.GetComponent<Image>().color = Color.red;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user