23.9 C
New York
Monday, April 28, 2025

Enter: Translate the frequency and amplitude of the file. HAPTICS TO THE INTENSITY OF THE LEFT AND RIGHT ENGINE OF UNITY


Meta has an software referred to as Haptics Studio purpose that means that you can create detailed haptic Timester knowledge. Points this knowledge within the following format as amplitude and frequency info:

  "indicators": {
    "steady": {
      "envelopes": {
        "amplitude": (
          {
            "time": 0,
            "amplitude": 0.0006520151
          },
          ...
        ),
        "frequency": (
          {
            "time": 0,
            "frequency": 0.7441585
          },
          ...
        )
      }
    }
  }

Within the unit, if you wish to make a recreation that vibrates a gamepad, the API it’s important to work with is:

Gamepad.present.SetMotorSpeeds(0.2f, 0.3f);

These two numbers are standardized (from 0 to 1) resistance values ​​for the left engine (low frequency) and the precise engine (excessive frequency) in a gamepad respectively.

I wish to write an algorithm that interprets the frequency and amplitude knowledge in a major solution to the data of the sources of time to ascertain the power of the left and proper engine.

The one downside is that I do not know something about sign processing.

There may be already some code, written in Rust, which isn’t optimum. That is what they are saying:

The algorithm we use to transform from .Haptic to a gamepadrumble is a bit foolish and it does not make a lot sense:

  • The amplitude wrap is used as low frequency motor engine speeds. The larger the amplitude of an interruption level, the larger the engine velocity.
  • Frequency wrapping is used as excessive frequency motor engine speeds. The upper the frequency of an interruption level, the larger the engine velocity. We used this algorithm simply because we didn’t wish to make investments time find a greater algorithm, and since it’s the algorithm utilized by good vibrations 3.9.

I’ve no solution to consider this algorithm, however they are saying it’s not good. Can anybody advocate a distinct approach of doing this? I’ve lots of programming expertise to have the ability to translate English into the code if somebody can describe a greater solution to do it.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles