public static void MoveHead(MotionProxy motionProxy, float?headPitch, float?headYaw, bool isAbsolute, float time = 1.5f) { if (motionProxy == null || (!headPitch.HasValue && !headYaw.HasValue)) { return; } List <string> names = new List <string>(); List <float[]> times = new List <float[]>(); List <float[]> keys = new List <float[]>(); if (headPitch.HasValue) { names.Add("HeadPitch"); keys.Add(new[] { headPitch.Value }); times.Add(new[] { time }); } if (headYaw.HasValue) { names.Add("HeadYaw"); keys.Add(new[] { headYaw.Value }); times.Add(new[] { time }); } var methodID = motionProxy.post.angleInterpolation(names, keys, times, isAbsolute); motionProxy.wait(methodID, 0); }