Colliders in if statement

I’m trying to make an arm grab the ground. I did this by creating a separate collider on top of the ground so it can act as a trigger without my character falling through the real ground.

As of now I’m just using a basic script that freezes the “hand” anywhere in the gamespace.

function Update() {

	{rigidbody.isKinematic = true;}
	{rigidbody.isKinematic = false;}


How can I make it only go kinematic when it’s inside the collider? the collider is called ‘ground’. I’ve tried doing it myself but my I just started to learn javascript. Any help is appreciated.


You can tell colliders to ignore other colliders, search the docs for “ignore collision” or you can turn the arm into a trigger and just say

OnTriggerEnter… then have an if(other.CompareTag(“ground”)…