Check location inside radius or capsule

In my game, I needed to check whether (Location) was inside (Capsule or Sphere).

I’m just posting the answer here because I couldn’t find any information on the Internet or on the forum.

Copy code here:

You may be able to use the “get extent” or “get bounds” nodes to provide some variables that will help with this