Detect the falling of a character

I have two troubles…

I need to detect when the character is falling from high, then instiate a ragdoll to (violent) impact over the objects in terrain…

Problem 1: How to detect when the character pass 2 seconds falling?

Problem 2: The rigidbodies is not touching my impoted meshes… ¿sombe body can tell why?

Not sure about the second problem, but for the first could you not just use an oncollisionexit and then use a integer that has number of 1 added to it every second and when it reaches the number you want, set it to violent fall or whatever? Then you would use oncollisionenter to reset that timer variable and give the damage and what not.

Are you using a CharacterController, rigidbody physics or kinematic animation for the character’s movement?

i’m using character controller, but when i change to rigidbody it trasppass everything in the fall.

You can get the speed of an object’s fall by recording it’s Y coordinate on two consecutive frames. Subtract one Y value from the other to get the distance and then divide that by Time.deltaTime to get the speed. If the speed goes beyond a certain value, then start the death sequence.

You forgot to mention that you start the sequence after hitting the ground.

i havent the time to check this, but i think that my colision with the rigidbody is posibly because i haven’t assigned a physic material to the objects…

it can be?

No, a physics material is just the way the object will react when it hits the object, for example:
Bounce.

I don’t know any others on the top of my head. But it is not the way it will stop when hitting an object.

What type of collider ( mesh, box, etc) are you using for the imported objects?

i don’t know what happened…

i create another scene to make insane things without touching my level…

I create a cube in the base of the mesh and the mesh as child… the cube with the necesary scripts (to detect when the mesh is landed)and Combine with children… When all were working well i put it on a prefab…

I use the prefab in the original game level and it works well

It would be very very very nice if U share your scripts :sweat_smile: