charactercontroller jumps when it collides with another one

Hi,

I wrote a script that moves some bots in direction to their target, keep a specified distance to each other and each one follows the bots in front of him.

In my first attempt I attached a rigidbody to the bot. It behaves as expected. Thereafter I removed the rigidbody and used a charactercontroller. After adapting the code I gave it a try and a strange behaviour showed up. Some bots sometime seem to jump. (Have a look at the video please).

public void FixedUpdate()
{
    Vector3 kVelocity = steer() * Time.deltaTime;
    
    float fSpeed = ( kVelocity).magnitude;

    if ( fSpeed > MaxVelocity)
    {
        kVelocity = kVelocity.normalized * MaxVelocity;

        kVelocity.y = 0.0f;
    }
            
    kVelocity.y -= Gravity * Time.deltaTime;

    m_kController.Move( kVelocity);
    }
}

The steer() function returns a velocity vector with y = 0.

Any ideas what could be wrong?

Thanks in advance!

By setting the “step offset” of the character controller to 0 (instead of the initial value of 0.3) the character stops “jumping”.

But by fixing the problem with setting the step offset to 0, I can no more climb stairs (Unity - Manual: Character Controller component reference : “The character will step up a stair only if it is closer to the ground than the indicated value.”)[/url]

Any idea what to do instead?