1
\$\begingroup\$

I've created an obstacle prefab. The Prefab has following hierarchy.

enter image description here

The player must die if he collides with Enemy. But It detects collision with parent object. I am also uploading the screen shot of property of enemy(Child Object) and Parent Object.

enter image description here

enter image description here

What should I change to let player collide with Child Object (Enemy).

\$\endgroup\$
2
  • \$\begingroup\$ Which function do you use to detect the collision? \$\endgroup\$
    – Leggy7
    Aug 23, 2016 at 16:26
  • \$\begingroup\$ Please provide the code, without it it's hard to determine what's the real problem here. \$\endgroup\$
    – tc07
    Sep 23, 2016 at 9:21

1 Answer 1

1
\$\begingroup\$

The box collider on the parent object is marked as "is Trigger". Maybe your code for the collision detection for this collider is causing the player to die when colliding with the parent object.

\$\endgroup\$
1
  • \$\begingroup\$ This is the most likely problem. If he just removes the isTrigger on the Box Collider and instead enables the Polygon Collider's isTrigger on the other object, it should pretty much be fixed. \$\endgroup\$ Dec 3, 2016 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .