- Home /
Rigidbody bumps slightly where ground colliders meet
Hello everyone, this is probably the first time I ask a question here since I couldn't find any solution to this.
As you can see in the image below I am instantiating terrain prefabs that have box colliders attached to them, and they meet perfectly without any gap.
Using a rigidbody with a capsule collider for the character and applying constant rigidbody velocity on Z <-
My problem is, whenever my character runs over the spot where the ground colliders meet, the character hops a bit in the air, it's not a large hop, something like .1 on the vertical axis, but still noticeable.
Is there any way to find a solution for this issue?
I've heard of this happening and also rb falling through these seams. I think it is a math issue. Have you tried overlapping the colliders?
Tried overlapping the box colliders, the hump still happens.
HI there ! co$$anonymous$$g back to this topic. Does anybody has a solution for this ? Thanks a lot ! :)
Answer by jprocha101 · Jun 23, 2015 at 12:48 PM
Try using a single edge collider or put a circle collider around your character's feet. The circle collider usually solves this issue.
Single edge as in, a plane? Also can't use a circle collider it only works with 2d rigidbody, this is a 3rd person game, I've only showed a side view screen.
Ah sorry, I saw the image and my brain started thinking 2D. What type of collider do you currently have on your character?
Side note: this issue is known as "ghost vertices". Searching for that term should find you some guides on $$anonymous$$imizing thier impact.
Capsule collider with locked rotation, so he can climb ramps. I'll see what I can find about these ghost vertices then, the motion is mostly visible because the camera follows t he character height as well, so when he bumps so does the camera, so I could probably fix it by giving the camera a late follow so that it only tracks the major movements. Thank you nonetheless.