Hello,
Please take a look at the first screenshot. The arrow will stick into the sword in the character's hand.
I hoped that through some modifications, the arrow will react differently when hit different items. For example, when it hits an iron weapon, it will rebound, and when it hits a wooden shield, it will stick into the shield. But I find a problem. When an arrow hits a GameObject in a character's hand, it will becomes a subobject of the arm, but not the GameObject. I checked Projectile.Oncollision (raycast hit? hit)。 Although the arrow only collides with the collider of the GameObject in hand, I can't get the information of this GameObject here. hit.Value.Transform.GameObject is the right arm. It makes me confused. Why? And what should I do? Thank you!
Please take a look at the first screenshot. The arrow will stick into the sword in the character's hand.
I hoped that through some modifications, the arrow will react differently when hit different items. For example, when it hits an iron weapon, it will rebound, and when it hits a wooden shield, it will stick into the shield. But I find a problem. When an arrow hits a GameObject in a character's hand, it will becomes a subobject of the arm, but not the GameObject. I checked Projectile.Oncollision (raycast hit? hit)。 Although the arrow only collides with the collider of the GameObject in hand, I can't get the information of this GameObject here. hit.Value.Transform.GameObject is the right arm. It makes me confused. Why? And what should I do? Thank you!
Last edited: