So I’m having an odd problem when I have identical platforms side by side. All objects seem to detect the join as a “tiny bump” instead of a flat surface. This is obviously really annoying because if I have the player running to the right and I have 10 of these platforms tiled, he’ll bounce up and down 10 times as he crosses.
Here’s a super simple example with a box. The box has a cube collider and a rigidbody attached. I attach the following script to the box
function Start () {
rigidbody.velocity.x = -1;
}
so nothing too fancy. But look what happens!
Image 1: I have one box of width 5 on the left
Image 2: and I have another box width 5 on the right. Notice that they are flush right up against one another (no gaps at all!)
Image 3: I hit play and the box starts moving to the left
Image 4: The box seems to “bump” into the join of the two platforms
Image 5: The box is now going the OTHER way!! What a jerk
Anyone have any thoughts? I’m prepared to get SUPER creative!
For clarification, both of the 5m long boxes are cube primitives. I colored them differently so you could see the difference. In other tests, I’ve had them be IDENTICAL copies (including texture!). In those cases, the “THUD!” still happens, but since the two cubes have the same image texture map, it looks like the box invisibly stops on its own!! haha :].
Thanks in advance for any help. I’m constantly shocked by how nice people are on this forum. wheehoo!
Ok, this problem is coming back. Now, instead of causing the crate to “bump backwards” the crate just slows slightly with each bump it passes over. Anyone have any idea on how to fix this?
Is the player operated with a CharacterController or grounded by a raycast, or something else? A raycast can sometimes detect a minute boundary between two colliders like this. You can avoid such problems by having more two or more rays close together and choosing the highest detected ground position as the “correct” one.