Exemplo n.º 1
0
    public Vector3 MoveBounded(Vector3 velocity, float speedFactor)
    {
        var move = _boundaries.GetRestrictedPosition(GetMovePosition(velocity, speedFactor)) - _gameObject.transform.position;

        _gameObject.transform.position = _boundaries.GetRestrictedPosition(GetMovePosition(velocity, speedFactor));

        return(move);
    }