- Home /
Player falls through floor after 10-20 seconds and above certain resolution consistantly(Bug?)
Hey guys, working on a doom-esque style first person shooter. I have a character controller set up and attached to the main camera.
Everything was working well, I could walk around and fire a weapon and interact with the level. Recently the character controller started falling through the floor at random points in the map, seemingly after I had fired my weapon(Rigidbody spawns and is catapulted forward) at my test enemy(Has a collider with trigger ticked to detect collision). The curious thing is that all of this worked really well, and it seems like it just screwed itself up heh.
Any ideas and insight would be greatly appreciated!
Additional info:
-The floor and walls are mesh colliders(Tested, those are A-okay).
-Creating a new camera and attaching a character controller seems to eliminate the issue. But oddly enough the settings are the as with my old controller.
-Project settings are default.
Do your bullet - rigidbodies have collision with your character controller? A$$anonymous$$A, slowly pushing you through the ground?
I recommend some value printing for debugging. Try to keep track of the collision with the floor and what happens when it disappears.
UPDATE
After much troubleshooting I have discovered that the player falls through the floor after a certain and fixed amount of time.
I have checked and I dont see any scripts that I have which could cause this, I even disabled all of my player scripts. $$anonymous$$oreover, it happens even when the player doesnt move from the starting point, in that area there are no triggers or sequences and as such no scripts should be at fault.
Can anyone help? This is really puzzling heh
Thanks guys!
P.S. - Console throws no exception.
UPDATE
Now this is getting so bizarre that I think it might be a bug in Unity. It appears that the character only falls through the floor when I am playing above a certain resolution(above 720p), and it always falls after 10 - 20 seconds of game start.........
I have tried creating a new character controller, new colliders, removing all scripts. Nothing helps, should I file a bug or does anyone have an idea?
Is there some downward force that is unaffected by collision? that pulls the character down through the platform slowly? A$$anonymous$$A is the Y position of the character changing over the 10-20 seconds? Personally I haven't tested anything yet on HD-resolutions, but I doubt that is the problem. Does it occur without use of the character controller, ins$$anonymous$$d using a rigidbody?
To me this seems hardly a bug in Unity. If that would be the case the forums would be crowded with issues like this.
Answer by jimmyismike · Aug 27, 2011 at 10:55 AM
Is there a collider on the character?
Yup, a capsule collider, which the character controller creates.
Answer by Driskard · Aug 07, 2012 at 05:15 PM
I have a similar problem. The collision detection on Character Controller seems to deactivate itself after some time. But this only happends when I use a LootAt function of me own wich does several RotateAround on various bones. If the RotateAround calls are commentented the problem does not appear. I dont see how the collision detection problem can be linked to te RotateAround. Any help to solve this mystery would be greatly appreciated.
Your answer
Follow this Question
Related Questions
Character Controller can pass through character controller after upgrade to 4.0 0 Answers
How to detect angles of walls? 1 Answer
CharacterController Physics 1 Answer
How to use character controller to push down hinge joint properly 1 Answer
Can a character collider be affected by a rigidbody collider? 0 Answers