- Home /
Child object's collider (on a different layer) is interfering with parent Physics...
Here is a glimpse of my Hierarchy:
Ball object (with sphere collider, rigidbody)[on 'default' layer]
- Cube object (Cube collider) [on 'testLayer' layer]
When the cube object described above is inactive, my ball object interacts normally with surroundings (it rolls, an bounces predictably according to "real world physics").
When it's activated, the ball stops spinning, as if the square collider is hitting other colliders.
This is surprising, considering that in Project settings -> Physics, I made sure to uncheck everything related to 'testLayer' (so as to have it not collide with anything at all ever, including itself).
Why is this happenning? Does the internal physics engine have a problem with children on different layers?
The problem is solved by changing that cube collider to a trigger... Why isn't just disabling collisions in physics settings sufficient to prevent this from being an issue?
Thank you!
I just tested the same thing, SphereCollider with rigidbody, with Cube as child, both on different layers and everything disabled for the layer of the cube.
It does work as expected. Rolling down a ramp while toggling the cube doesn't change anything. There must be something else wrong with the cube, maybe a script, or a rigidbody on it...
It seems you're absolutely right hexagonius; I tried recreating the problem in a controlled environment (new empty project) and was unable to produce the unexpected behavior. I guess a thorough project review is in order! Thanks for the response.
Your answer
Follow this Question
Related Questions
Collider/trigger collision causing physics glitch 0 Answers
overlapsphere to destroy NPCs on exit 1 Answer
Collider Lifts me off Ground ??? And I'm afraid of heights !!! 1 Answer
Prevent shooting when gun is inside wall 1 Answer
Layers are colliding even though they are set to ignore each other 1 Answer