- Home /
Changing layers will not stop a collision, but changing scale will.
This is a surreal problem.
Basically, the player has some ability which allows their layer to change. If the player is standing on something, and then changes their layer such that they should now not be colliding with that thing, they will float in the air. Unity does not register the collision exit and so they do not fall.
However, as soon as you change the player's localScale (and I stumbled on this by sheer chance) they will fall through it.
Is this a strange collision bug? Bug or not, is there any other known way to cause the player to fall when they should? I don't really want to have to change the scale just for this.
Answer by whydoidoit · Feb 19, 2014 at 03:20 AM
I'm guessing that the collision system isn't really designed to consider the change of a layer (it's expecting things to be on a layer and stay there)- so I guess you need to effect a physical property that will update the collision system after changing the layer.
Your answer
Follow this Question
Related Questions
Troublesome collision detection when changing rigidbody.velocity directly 0 Answers
Unet collision and layer mask issues 0 Answers
Duplicated object doesn't collide but original does 1 Answer
How to prevent object collision with its spawner 1 Answer
IgnoreCollision affecting children & unrelated objects when it should'nt ? 0 Answers