Sword prefab

I found that you can just package the slash animation spawn point and the weapon collider into the sword prefab itself.

you say right ,case this is all for Sword

This is good if you want to have a different weapon collider and slash animation per weapon.

If you are using the same one then it’s better to do it the way we are in the lecture. Depends on your needs.

Yeah you’re correct. Or perhaps even you could do both. Just off the top of my head, you could make the slash animation a prefab in itself (so that it can be reused), and then package it in the sword prefab for easier access. There are always many ways of doing the same thing.

From a learning perspective, I also agree that often there is a reason that the instructors are doing it the way they are doing it, and following along exactly can help to prevent stumbling into issues further in the course because you’ve done something a different way. For myself, sometimes doing things slightly differently helps me to engage with the code and understand it better.

1 Like

I haven’t finished the course yet but it appears that the only weapon that is using the weapon collider and slash animation is the sword. I haven’t gotten to the actual bow and staff implementation yet.

Privacy & Terms