- Home /
Instantiated objects do not work with Hitboxes(2D)
I have recently ran into a major issue with Unity, being that for some odd reason, Instantiated objects do not work with my hitbox system.
My Hitbox system is based around using the animator to activate and deactivate 2d box colliders set as triggers and using the OnTriggerEnter2D method to hit all of the objects inside their area when they are entered. This keeps objects from getting hit multiple times from the same hitbox and lets you very quickly and easily put hitboxes over other animations.
The problem, as previously stated, is that instantiated objects simply do not work with it. Hand-placing enemies into the scene are hit fine, even if they are of the same prefab as the instantiated object.
You need to be clearer about the setup you have and how instantiated objects come into play. What happens with your colliders/ overlaps and what should happen? What has the animator to do with it?
Your answer
Follow this Question
Related Questions
Why didnt my Collider works? 0 Answers
How To Make My 2D Character Jump Gradually 2 Answers
Bumper physics not working, 1 Answer