- Home /
What else is to be done if players falls through the floor?
Hey there! If we have a player and when he walks around, he sometimes 'collides' with objects...but especially, the small mountains/butes....like if I move around a 'push' on purpose on the floor...I fall through it.
This is clearly a collider problem....but I don't understand, there is a mesh collider on the ground...and it still does that...I tried making a 'box' collider. instead..., it seems that works better; but even there the player 'may go through a floor/object'...with 'pushing on it' continuously..thus, object/player intersecting problem.
This is realted to the physical engine...I am starting to think these are natural limitations of hit collision (of this physixs engine), I read that the Havoc engine could mitigate that..but how do you 'proof' the floor to never make the player go through/fall through it by gravity...I noticed when I crouch in the game...and 'push' repeatedly, the engine can have difficultly and then I fall through the floor...like as 'Update' and 'Fixed Update' for the physic engine (in Project settings > Physics)...can't keep up and so CPU may 'skip' a frame calculation and so the object 'passes through/intersects' and can literally 'Fall' trhoguh the floor...
I tried several different settings in the Physics project settings....made no difference; I activated 'collision callbacks', dynamic collision, and so forth tried them all..all of them makes player fall through floor. It is as if the Mesh Collider on the ground/floor is 'transparent/empty/non-blocking surface' by times...and only works if you 'don't push' too much on the floor...like crouching and moving like crazy...
If I walk slowly and just 'forward' never pushing down on the floor...it works...like just that...as soon as I jump, do crouching, crazy moving..then I fall through...the physics engine can't keep up with the movement collisions if 'it,s too fast/too much', so that is when 'objects/player' go through each other/intersect and 'falll through floor' in a endless fall (by gravity)...
I tried with more physics iterations/calculations CPU....which slows down frame rate but makes a more precise physics hit collision calculations...made no difference.
How can we make the floor 100% 'waterproof/fallproof/untransparent', so that the player Never Falls Through the flloor...
I read that there is not much to be done about this problem; like there are some scripts that helped, I added several 'box colliders' under the ground/floor..and that works...but I still can 'go through' mountains/butes/duners....if I push in them...if I go through them, only the invisile 'under the floor' colliders 'hold me' from falling by gravity..but I'm still 'out of the floor'...walking in the air on an 'invisible' box collider
I am thinking only switching with Havoc physics engine might solve this...because the PhysiXs Unity physics engine is not capable (it seems?) of making the player/objects Not intersect and fall through each other during the intercollisions of their respective surfaces....
Any help is greatly appreciated and happy holidays/new year 2021! Thank you very much.
PS: ''continuous detection modes'' for collisions...tried them all. not working. ''change Update to FixedUpdate''...tried, no difference.
Your answer
Follow this Question
Related Questions
BoxCollider get stuck when dragging over the border of two BoxColliders 1 Answer
Detect if a non-trigger collider is inside another collider 1 Answer
How to detect correct collision from multiple game objects? Separate collisions 0 Answers
Gameobject not detecting collison from other Box Collider 2D [SOLVED?] 2 Answers