At 1:41 Ricks adds a box collider 2d and says its only active for one animation?

Hello,

At 1:41 Rick adds a Box Collider2d component to the lizard game object. He then selects the walk animation in the animation window then selects a time in the timeline before configuring the collider. He even mentions here that he does this because he doesn’t want the Lizard to be able collide with the projectile during the jump animation.

My Lizard has the collider at all times.

My question is: How is Rick making the collider ONLY be active during the walk animation without adding an event or method to call during that event?

Hi,

Welcome to our community! :slight_smile:

Your thread is tagged with “18_gl_cud”, which refers to lecture “Implementing Health & Damage” (currently #138). I watched the video as of the 1:30 mark but Rick didn’t say anything about the collision with projectiles near the 1:41 mark. Did I miss anything?

If Rick didn’t disable the collider component at the beginning of the jump animation, and didn’t enable at the end of it, and if he didn’t use any events or methods, the collider is still active. The projectiles would collide with it.

Hello,

You have the correct video. He starts talking about the lizard collider at 0:50 and then the point he says that he only wants the projectile to collide with a certain animation is at around 1:05 and he concludes that section around 1:30 so I was a few seconds off.

If you get a chance to rewatch it please let me know what I’m missing.

Now I got what you meant. I think Rick wasn’t aware that the animation does not change the shape of the collider. You can see that because there is no Collider2D property anywhere in the list. Rick didn’t check the other animations to verify his assumption.

Long story short, you didn’t miss anything. Rick said and thought he was making the collider only be active during the walk animation but, actually, he didn’t do that.

Thanks for pointing this issue out. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms