converted third person controller to C#