Skip to main content

Transformation

Please read the plugin documentation beforehand.

Examples are available for each compatible version of Unreal Engine in the Plugin Sample repository

WARNING

Before launching any example, the project source files must be regenerated to allow Unreal to place the plugin DLLs in the right place (or it will crash when the example is played).

To do this : In Windows Content Explorer, right-click on the .uproject file and select Generate Visual Studio Project Files.

SkineticDeviceSetting


The example "5_Transformation" is an illustration of effect spatialisation on interaction, where the user can modify the position and dispersion of a object shooting toward a capsule representing the Vest position.

The impact position on the capsule is then processed to translate the effect on the vest in a similar position.

Skinetic handling is integraly done in the Capsule_StaticMesh_BluePrint BP. (located in the SkineticSDK Content → 5_Transformation → BP folder)

Connection, Disconnection and Pattern loading

  • As in any of the examples provided, a Skinetic Device Data Asset is created and set as default device in Project Settings > Plugins > Skinetic.

    SkineticDeviceSetting

  • Connection, disconnection and pattern loading are handled with BeginPlay and EndPlay events:

    Connect Disconnect

  • Get Default Device is used to retrieve and store a reference to the Skinetic device set in plugin parameters.
  • Skinetic Connect function handles the connection to the default device.
  • A Skinetic Patterns (Obj. references array) variable is added to the blueprint. It contains transformable Pattern Assets. Each pattern references a pattern previously created with Unitouch Studio and loaded in the content browser.

  • The patterns are loaded into the connected device with Load Pattern.

  • The patterns are unloaded in the same manner at the end of the play with Unload Pattern.

  • The device is then Disconnected.

Event Hit Transformation

The impact area is represented by a capsule.

Impact position information is retrieved to calculate and provide the play with the 3 elements allowing the translation of the effect.

Play

  • The Height Property is calculated using the Get Vertical Translation Height local function, which substracts the capsule origin vector from the projectile hit location vector. The yaw component of this subtraction result represents the difference in height between the impact and the vest representation. It is then divided by 100 because the default unit in Unreal Engine is centimeters and the desired input unit for the SDK is meters.

    Height

  • Heading Property is calculated by the Get Vertical Rotation Angle function. It uses Unreal's Find Look at Rotation to calculate the angle difference between the hit location and the forward vector of the capsule. Heading angle is the Yaw (Z) component of this result. The result is then inverted (* -1) to match the intended direction of rotation (clockwise).

    Heading

  • The Tilting Property is calculated by the Get Tilting Angle function. Similar to the Heading calculation, it uses Unreal's Find Look at Rotation function to calculate the angle difference between the hit location and the capsule's forward vector. It then uses the Pitch (Y) component.

    Tilting