[Solved] Character Physics don't Work

Hello people!

Was wondering if anyone can give me a hand here, I looked at all the examples and the documentation and found no solution.

What happens is, I create a scene where I have a 3D rigged model, and added to it a physics collider, shape as capsule and the type is character controller.

What happens is that when beginning the game, the physical works normally on all other objects except the character, which is static.

Trying to solve the problem, I put a few lines of code that were present in the example “Character Controller” because I noticed that these lines starts the physics for the character right? :confused:

But still, nothing as worked. I wonder if anyone can help me? :sob:

Hello Rodrigo,

I could not reproduce the problem. Elements having the type character controller are actually falling as other elements for me (without having to set the character physic parameters (gravity, fallspeed, etc…)

The only problem that I noticed (and that we will fix soon) is that the physic collider displayed in the editor for the capsule shape is actually slightly different from the shape used for collisions.

Question: Do you happen to set the position of your character by hand in some scripts?

Yes, i chance de character position and rotation in the script.
Follow the code:

 private Vector3 GiraPersonagemPosicao (float dragValue, Vector3 Posicao)
        {
            var entetyRotation = Quaternion.RotationY((float)(2 * Math.PI * -dragValue));
            Posicao = Vector3.Transform(Posicao, entetyRotation);

            return Posicao;
        }
        private Quaternion GiraPersonagemRotacao (float dragValue, Quaternion Rotacao)
        {
            var entetyRotation = Quaternion.RotationY((float)(2 * Math.PI * -dragValue));
            Rotacao *= entetyRotation;

            return Rotacao;
        }

        private float MovePersonagemZ(float posicao)
        {
            var tempoTranscorrido = (float)Game.UpdateTime.Elapsed.TotalSeconds;
            if (estado == 1)
            {
                posicao = posicao + tempoTranscorrido * 1.0f ;
            }
            if (estado == 2)
            {
                posicao = posicao + tempoTranscorrido * 3.1f;
            }
           
            if (estado == 5)
            {
                posicao = posicao - tempoTranscorrido * 1.0f;
            }
            
            return posicao;
            
        }
        private float MovePersonagemX(float posicao)
        {
            var tempoTranscorrido = (float)Game.UpdateTime.Elapsed.TotalSeconds;

            if (estado == 4)
            {
                posicao = posicao + tempoTranscorrido * 1.0f;
            }

            if (estado == 3)
            {
                posicao = posicao - tempoTranscorrido * 1.0f;
            }
            return posicao;

        }

Please Ignore this topic, here is my real problem:

Sorry for the inconvenience :confused: