What happened when :
a player wanted to cross the river .
Water has collider (tag : WaterBase)
Pull has collider (tag: WaterHardles)
Script Attach with Player:
- void OnTriggerEnter2D(Collider2D other)
- {
-
- if (other.gameObject.tag == “WaterBase”)
- {
-
-
- Debug.Log(“WaterBase Collions”);
-
- }
- else if (other.gameObject.tag == “WaterHardles”)
- {
-
- Debug.Log(“WaterHardles Collision”);
- }
- }
Player Detects the WaterHardle Every Time First and then WaterBase .Other info plz read instruction on image
