Why not just disable the Capsule Collider?

For my solution, I just disabled the capsule collider in the Die() method. As I felt this was the simplest solution to what the problem being shown was, which was we cant sometimes click on an enemy behind a dead one.

The solution that was explained seems Really overly complex (from my point of view) for what was asked for the challenge and implied by the instructor. So is there a reason why the instructors chose the method they displayed ? Does it tie in for a future feature ?

if so it might be worth, being more specific about what you want from the challenge. As I bet 90% of the students initially just disabled the capsule collider.

Cheers
Paul

That’s definitely one way to do it, and if I remember correctly on the Udemy website others said they did that. However - with these courses it’s about trying new ways of doing things - challenging you, extending your abilities. If you always go for the easiest solution or something you already know how to do instantly, it doesn’t really help you get better. And also, there may be scope reason for that particular method, which will only be found out later.

One problem with a lot of the other courses out there is they do not handle any kind of scope at all. What I like about the RPG course is that it sets you up with a lot of good knowledge and best practice for stuff down the line. Doing stuff like disabling colliders is fine but could cause an issue down the line once the game gets bigger depending on how you handle your collisions.

IMO it doesn’t really matter how you solved it, if you did, that’s a good thing!

Just my thoughts.

Yes I totally agree,!
One thing I am discovering on this journey from the 3D course to this, is that there is always another way. This just really struck me as odd, to do all that when disabling the collider does exactly the same output. So I thought I would ask just in case I do need to go back and alter my code. As in subsequent courses as I am working through all four they rely on this particular method :slight_smile:

And other thoughts are always welcome!

There are many ways to the same destination. We will often show you ways of getting to a solution that might not be the most common, because we want you to have the most tools in your arsenal possible.

1 Like

Hi Brian :slight_smile:
I do get it :slight_smile:
I just wanted to be sure my solution, was not going to come back to bite me in the bum a course or two on :slight_smile:

And for me to be querying my solution to Ricks I consider a win considering a couple of months ago I could not even attempt the challenges :slight_smile:

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

Privacy & Terms