Esempio n. 1
0
    void Update()
    {
        Collisions.Reset();

        ApplyGravity(ref _velocity);
        ApplyFriction(ref _velocity);
        CapVelocity(ref _velocity);

        CheckForCollisions(ref _velocity);

        if (_transform.localScale != Vector3.one)
        {
            Debug.LogError("localScale needs to be 1/1/1 or else collision is sad.");
        }
    }