add an exact overload to haptics component SendCustomWaveform similar to hand layer or haptic glove classes

This commit is contained in:
Mamadou Babaei
2026-02-24 11:44:00 +01:00
parent 1e78d199a5
commit e986b14efd
4 changed files with 38 additions and 0 deletions
@@ -156,6 +156,18 @@ bool USGHapticsComponent::SupportsCustomWaveform(const ESGHapticLocation AtLocat
return false;
}
bool USGHapticsComponent::SendCustomWaveform(
USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
{
USGHapticGlove* Glove{Pimpl->GetGlove()};
if (IsValid(Glove) && Glove->IsConnected())
{
return Glove->SendCustomWaveform(OutWaveform, Location);
}
return false;
}
bool USGHapticsComponent::SendCustomWaveform(
const float Amplitude, const float Duration, const ESGHapticLocation Location)
{
@@ -131,6 +131,15 @@ public:
*/
bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const;
/**
* Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
* custom waveforms.
*
* @param OutWaveform
* @param Location
*/
bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location);
/**
* Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
* custom waveforms.
@@ -92,6 +92,13 @@ bool UHapticsComponentKismetLibrary::SupportsCustomWaveform(
return HapticsComponent->SupportsCustomWaveform(AtLocation);
}
bool UHapticsComponentKismetLibrary::SendCustomWaveform(
USGHapticsComponent* HapticsComponent,
USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
{
return HapticsComponent->SendCustomWaveform(OutWaveform, Location);
}
bool UHapticsComponentKismetLibrary::SendCustomWaveform_Amplitude_Duration_Location(
USGHapticsComponent* HapticsComponent,
const float Amplitude, const float Duration, const ESGHapticLocation Location)
@@ -95,6 +95,16 @@ public:
static bool SupportsCustomWaveform(const USGHapticsComponent* HapticsComponent,
ESGHapticLocation AtLocation);
/**
* Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
* custom waveforms.
*
* @param OutWaveform
* @param Location
*/
static bool SendCustomWaveform(UPARAM(ref) USGHapticsComponent* HapticsComponent,
USGCustomWaveform* OutWaveform, ESGHapticLocation Location);
/**
* Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
* custom waveforms.