OnTriggerEnter on a child of the first person not working?

I run the function OnTriggerEnter (other:Collider) on a object that is child of the first person…
but doesn’t seem to work. Why is that?

When you add an OnTriggerEnter() method, you’re not running it so much as handling the event.

Is that what you meant, that you added an OnTriggerEnter() method, or you really do mean you invoked it?

Tell us more about these GameObjects, especially the child you’re using as a trigger and the one that’s colliding with it. Do they have colliders? Do they have rigidbodies? Did you set IsKinematic or IsTrigger on either of them?

Alternatively, see the table at the bottom of this page to predict when triggering will / will not occur:

It’s a bit complicated the first time. :slight_smile:

So, i get the FP prefab, and get game object cube, which i called Cube01
I have a 3d model of arm with animations. I make this cube a child of the wrist bone.

I trigger the arm to play the animation of grabbing on objects when my first person OnTriggerEnter another cube called Cube03
Now I want when my first Cube01 hit the objects (which is also a game object cube) called Cube02 to set my boolean var to true.
The script here below is attached to my Cube02 (it could be a vase) and give my Cube01 the tag name of Handbox.

So you want cube01 to hit cube02 and call boolean to true? or cube01 to hit cube03? the question is confusing or Im confused lol.

Maybe something like this? its hard to say because Im not sure if I really understood your question :frowning:

Are you getting the collision you want? Debug.Log(“yep its triggering no arm movement yet”)

function OnTriggerEnter(other : Collider)
{
		
	if(other.gameObject.tag == "Handbox")
	{
		var go = GameObject.Find("Cube03");
		go.GetComponent("yourScript").handinside = true;
				
	}

}

i found the problem, i forgot to add Rigidbody to the Cube01 and forgot to activate “Is Kinematic”

:slight_smile:

Glad to hear you figured it out. :slight_smile: