暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

IDualMotorRumble.cs 1.5KB

123456789101112131415161718192021222324252627282930
  1. namespace UnityEngine.InputSystem.Haptics
  2. {
  3. /// <summary>
  4. /// A simple haptics interface that allows to control two motors individually.
  5. /// </summary>
  6. /// <remarks>
  7. /// Dual-motor control is most common on gamepads (see <see cref="Gamepad"/>) such as
  8. /// Xbox and PlayStation controllers.
  9. /// </remarks>
  10. public interface IDualMotorRumble : IHaptics
  11. {
  12. /// <summary>
  13. /// Set the motor speeds of the low-frequency (usually on the left) and high-frequency
  14. /// (usually on the right) motors.
  15. /// </summary>
  16. /// <param name="lowFrequency">Speed of the low-frequency (left) motor. Normalized [0..1] value
  17. /// with 1 indicating maximum speed and 0 indicating the motor is turned off. Will automatically
  18. /// be clamped into range.</param>
  19. /// <param name="highFrequency">Speed of the high-frequency (right) motor. Normalized [0..1] value
  20. /// with 1 indicating maximum speed and 0 indicating the motor is turned off. Will automatically
  21. /// be clamped into range.</param>
  22. /// <remarks>
  23. /// Note that hardware will put limits on the level of control you have over the motors.
  24. /// Rumbling the motors at maximum speed for an extended period of time may cause them to turn
  25. /// off for some time to prevent overheating. Also, how quickly the motors react and how often
  26. /// the speed can be updated will depend on the hardware and drivers.
  27. /// </remarks>
  28. void SetMotorSpeeds(float lowFrequency, float highFrequency);
  29. }
  30. }