hello my name is Rubens Torres am Brazilian do not speak English very well sorry for any typing error this is my first post here, I have a doubt in my script C# in Unity, I have an object named Player with a script called PlayerController and has a child named Legs, I was wondering if there is how to make the script the Player detects a collision of Player child in this case Legs, here is my script
public class playerController : MonoBehaviour {
public GameObject legs;
void OnCollisionStay(Collision collisionInfo) {
if(collisionInfo.gameObject.tag == "Ground")
{
print("Jump");
}
}
}
with it when the player collides with the object with tag SwithcMachine print runs, but I want that to happen when collided with the Legs instead of Player, if anyone knows any solution for this, please tell how to do thanks in advance.