예제 #1
0
bool ULeapMotionFunctionLibrary::GetPinchStrength(int32 HandId, float& PinchStrength)
{
	FLeapMotionDevice* LeapDevice = FLeapMotionControllerPlugin::GetLeapDeviceSafe();
	if (LeapDevice)
	{
		LeapDevice->SetReferenceFrameOncePerTick();
		return LeapDevice->GetPinchStrength(HandId, PinchStrength);
	}
	return false;
}
예제 #2
0
void ALeapMotionHandActor::Update(float DeltaSeconds)
{
	FLeapMotionDevice* Device = FLeapMotionControllerPlugin::GetLeapDeviceSafe();
	if (Device && Device->IsConnected())
	{
		Device->GetPinchStrength(HandId, PinchStrength);
		Device->GetGrabStrength(HandId, GrabStrength);
	}

	UpdateBones(DeltaSeconds);

	OnHandUpdated.Broadcast(HandId, DeltaSeconds);
}