- Home /
Character becomes detached from own collision capsule and sinks when moving over certain parts of terrain
My 3rd person character starts off moving over standard unity terrain without any issues:
However, when I walk over certain parts of the terrain only, the character starts to rapidly sink, until it has disappeared under the terrain. It doesn't fall however, since it seems the character has become separated from its collision capsule, which remains on the ground:
The character still runs around, but moves erratically left and right. This only happens in some areas of the terrain, like there are invisible holes. But it's strange that the collision remains on the surface. It doesn't appear to be related to the gradient of the terrain, since it happens on various slopes. Any ideas what's going on? (I am using an identical player controller on another level with no problems, so it doesn't appear to be settings on that).
$$anonymous$$aybe check if one animation is using root motion and another not. Try disabling the LOD and see if that helps.
Answer by toddisarockstar · Jan 04, 2016 at 05:17 PM
is the rigidbody attached to the parent? Maybe you have the rigidbody attached to a child object in the hierarchy. if so, gravity shouldn't be turned on with children colliders. only the parent object's rigidbody should have gravity. the character controller shouldn't ever seperate if you only have one rigidbody controlling gravity of the parent object.
if your x and z is also snapping places maybe its an animation issue snapping to world space? if your object with the animation component attached is not allready the root parent object, Try putting him in an additional empty parent.
Hmmm, I have no rigid bodies attached to children and the animation component is in the top level... But I fixed it temporarily by disabling the foot I$$anonymous$$, as I realised it was something to do with that. Will give you the answer anyway, since this is nevertheless helpful. Cheers.
Your answer
Follow this Question
Related Questions
Terrain collider is inaccurate 3 Answers
Terrain Generation ruins collision 1 Answer
Terrain - Detect collision coordinates? 1 Answer
Character Controller Slope Limit on Terrain 0 Answers
Car falls through terrain 2 Answers