- Home /
2D platformer enemy collider used as range to detect causing my player to not go into jump animation when inside it
am making a 2D platform shooter, still a beginner so can't understand much about unity engine. I wanted to know how enemy range works to detect players.
have created a player, which has a collider(on trigger) that checks for ground and if in air the player then goes into it's jump animation. -The enemy only has an idle animation and a walk animation. It has a box collider that I use as the enemy -range which is to detect the player. -Now I haven't done much coding to the enemy yet, which I will be. I haven't added any tags or layers either which I will be doing as well.
-But when I play my animation now the player never goes into the jump animation when it is inside the enemies range(That's the on trigger box collider I am using for range). -So I am hoping if anyone can explain me how should I work this out if I want to make sure everything works well by the time I finish the enemy AI script as well. Right now I am assuming adding tags and sorting them into layers will solve the problem but dunno yet. Still gonna try it though.
Your answer
![](https://koobas.hobune.stream/wayback/20220612112852im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2D Enemy AI range problem 2 Answers
2D Area of Effect Script - OverlapCircle not working 1 Answer
"ArgumentException: get_time can only be called from the main thread." 1 Answer
How to make Enemies 3 Answers
Unity Enemy Range detection 3 Answers