0
\$\begingroup\$

Here is the problem. This is the exterior of the hallway in which my player capsule is standing. Notice the bottom of the capsule poking through the floor.
enter image description here

This is the interior of the hallway, notice my player capsule standing there
enter image description here

And this is the view from the player's fps camera
enter image description here

I attached a mesh collider to the hallway's interior (named SpaceshipMain_001-FBXFile2) so it should simply follow the fbx's visual geometry right? Also I know it's not the player's capsule collider because the player's capsule collider actually extends beyond the bottom of the player capsule.
enter image description here

It's worth noting that the player capsule isn't "stuck." I can walk all over the hallway, it's just that part of the capsule protrudes below the bottom of the floor. I didn't even have a chance to tag the ground level yet to complete the ground check functionality for jumping.

So why is my player capsule sinking below the floor? Is there any way that I can actually see the mesh collider for SpaceshipMain_001-FBXFile2 in case the collider isn't actually flush with fbx's geometry?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ It looks like you have more than one capsule collider here - can you show us how all of them are set up? It could also be that the character controller's center and height are being used instead of the collider's - we can't see the cylinder's settings to check whether they match what the controller says. \$\endgroup\$
    – DMGregory
    Feb 24, 2022 at 4:19
  • \$\begingroup\$ Is there more than 1 capsule collider? Where are you seeing that in the picture? Also yeah I can definitely show more, what part of the code should i show? Would it help if I post the player prefab and ship's fbx file? \$\endgroup\$ Feb 24, 2022 at 5:44
  • \$\begingroup\$ Ohhhhh I see I accidentally added a capsule to the cylinder in addition to the parent first person GameObject. I fixed it by deleting the capsule collider on the cylinder and enlarging the capsule collider on the parent first person GameObject. I'll post a solution shortly, thanks for the help! \$\endgroup\$ Feb 24, 2022 at 6:03
  • 1
    \$\begingroup\$ "Where are you seeing that in the picture?" In the last image, you can see three sets of green capsule-shaped wireframes, nested like matryoshka dolls. The outermost one is brightest, but there are two fainter ones inside. \$\endgroup\$
    – DMGregory
    Feb 24, 2022 at 12:42

1 Answer 1

0
\$\begingroup\$

I accidentally added 2 capsule colliders. I correctly added 1 to the First Person Player prefab object but then added a second one to Cylinder. I deleted the capsule collider attached to Cylinder and enlarged the capsule collider attached to First Person Player because it was way too small. The fact that it was too small caused the collision to happen several inches or maybe a foot above the bottom of the mesh in First Person Player

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .