- Home /
Question by
hossenshovon1 · Oct 08, 2020 at 11:22 PM ·
vector2
Vector2.right left or down is working, but vector2.up is not working when i hit a box, it's not destroying - i think it's a bug of unity (-_-)
screenshot-1181.png
(88.6 kB)
screenshot-1180.png
(37.3 kB)
Comment
Answer by Eno-Khaon · Oct 09, 2020 at 12:13 AM
Based on your script image, are you intentionally checking for a GameObject with the name "Box", rather than with the tag by that name?
Edit: As a side note, you should be able to get slightly better performance by using
GameObject.CompareTag("TagName")
instead of
GameObject.tag == "TagName"