integrate the virtual hand mesh from allbreaker
This commit is contained in:
@@ -14,6 +14,7 @@ This is the second major release of the SenseGlove Unreal Engine Plugin adding s
|
||||
- Added support for the SenseGlove Nova 2 devices.
|
||||
- Various classes have been added to the API in order to implement the new functionalities and features from the latest upstream SenseGlove libraries.
|
||||
- Added initial support for the upcoming Unreal Engine 5.4 release.
|
||||
- Added a pair of default production-ready virtual hand meshes for the left and right hands, courtesy of [Allbreaker LLC Columbia](https://www.allbreaker.co/). For usage and redistribution, please consult the [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) file.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -85,3 +85,16 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
```
|
||||
|
||||
## Allbreaker Virtual Hand Models
|
||||
|
||||
```
|
||||
The virtual hand model mesh included in this plugin, situated within the
|
||||
‘Contents/Meshes/Allbreaker’ folder, is graciously supplied by Allbreaker LLC
|
||||
Colombia. This provision is made pursuant to an agreement between SenseGlove
|
||||
B.V. and Allbreaker LLC. Users of this plugin are bound by the terms outlined in
|
||||
the license agreement and are advised to review the terms and conditions
|
||||
specified therein.
|
||||
Please visit https://www.allbreaker.co/ to obtain information about the work of
|
||||
Allbreaker.
|
||||
```
|
||||
|
||||
@@ -36,11 +36,8 @@
|
||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||
|
||||
#include "Animation/Skeleton.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "Components/SkeletalMeshComponent.h"
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#include "Templates/UnrealTypeTraits.h"
|
||||
#include "UObject/ConstructorHelpers.h"
|
||||
|
||||
@@ -60,29 +57,29 @@ struct USGVirtualHandComponent::FImpl
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
@@ -214,7 +211,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
||||
|
||||
bAutoStopAllHapticsOnEndPlay = true;
|
||||
|
||||
GrabSocketName = FName{TEXT("GrabPoint")};
|
||||
GrabSocketName = FName{TEXT("GenericGrabPoint")};
|
||||
|
||||
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
|
||||
|
||||
@@ -568,25 +565,12 @@ USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
|
||||
|
||||
void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
|
||||
{
|
||||
// FIXME
|
||||
// Since we dont ship a default virtual hand mesh at the moment, calling SetDefaultMesh causes the following failed
|
||||
// assertion due the fact that the engine won't be able to find the asset at the default location:
|
||||
// Assertion failed: IsInGameThread()
|
||||
// Unable to load /SenseGlove/Meshes/SK_SenseGlove_VirtualHand_*. Objects and Packages can only be loaded from the
|
||||
// One workaround would be disabling the async loading or as an alternative simply disabling this portion of the
|
||||
// code should be a good-enough fix until we address this issue in it's own time.
|
||||
//Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
|
||||
Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
|
||||
}
|
||||
|
||||
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
|
||||
{
|
||||
return Owner->
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
|
||||
GetSkeletalMeshAsset()
|
||||
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
||||
SkeletalMesh
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
||||
;
|
||||
return Owner->GetSkeletalMeshAsset();
|
||||
}
|
||||
|
||||
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
|
||||
|
||||
Reference in New Issue
Block a user