- Home /
Character controller cannot enter tunnel despite plenty space
Why would the character controller in this screenshot be unable to enter the tunnel where you can see there's plenty of room? Stranger still, why would increasing the radius of the character controller allow it to enter the tunnel?
$$anonymous$$aybe because as mentioned above you have a box that does not fit the actual geometry of the tunnel. While increasing the radius, the collider is now over the box and the collision is not considered anymore.
converting to comment since it does not really help the questioner.
I don't have any colliders approximating geometry. They all exactly match the geometry to which they are attached. As you can see with the green in the screenshot, the collider on the player is a capsule matching the player's size and shape. The same is true of all the walls. There's no collider blocking the player's collider.
Answer by MarkD · Oct 13, 2013 at 02:06 PM
Two things are happening:
Most likely as said by others is the enviroments collider to big.
Secondly, The reason why you are able to pass trough it when you upscale your character is because your collider is so big that when you move, it forces itself trough the collision, I had this occasion many times and it made my character glich trough walls.
Keep an eye on those two things and you should be fine
I think there is evidence to the contrary, but maybe I'm not fully understanding. After I get into the tunnel (with the larger radius) I can still climb the stairs, be stopped by all the walls and hit the ceiling if I try to go too far up the steps. These do not seem like things that would happen if the collider were having such serious problems. The environment is a mesh with colliders on every surface. Why would the collider be the "wrong" size if it was generated from the mesh? The project I'm talking about is running at http://enigmadream.com/UnityTest/Gar.html ... it's hard to describe how to find this tunnel (especially because it's inside a secret passage) - there's a throne with a secret panel underneath it that you can walk through. But maybe general interaction with this castle mesh will give clues as to what's going on with the collider. Is there any evidence that the collider is the problem?
I was trying out the game, and found the tunnel. I had no problems with walking there?
@FusionSausage Well, the version that's posted now has the radius increased so you can get into the tunnel (although sometimes with a slight hesitation). So now you see what the behavior is like after I increase the radius. Do you see any evidence that the behavior is as described with the colliders too large? It really doesn't seem like a collider overlap problem does it? So there must be some other explanation why it doesn't work when I reduce the radius...
I also noticed while playing your game that most of the stuff is way out of scale, did you keep 1 unit = 1 meters?
@$$anonymous$$arkD Way out of scale? Can you give an example? I didn't actually develop most of the content. It was developed by a family member in Sketchup. and for some reason when I imported it into Unity, I had to scale it by 0.03 to get it to about the right size. The units may be a little off, but I don't know of anything "way out of scale".
Your answer
