查询到有效信息是4.24版本的MotionController的source设置为Special_1是无效的,尝试按照网上教程设置SteamVR也是无效的,升级到4.25版本也无效。
最终还是用C++代码调用USteamVRFunctionLibrary库实现了
TArray<int32> DeviceIds;
TArray<int32> TrackerIds;
USteamVRFunctionLibrary::GetValidTrackedDeviceIds(ESteamVRTrackedDeviceType::Controller, DeviceIds);
USteamVRFunctionLibrary::GetValidTrackedDeviceIds(ESteamVRTrackedDeviceType::Other, TrackerIds);
DeviceIds.Append(TrackerIds);
if (DeviceIds.Num() > 0)
{
FVector loc;
FRotator rot;
USteamVRFunctionLibrary::GetTrackedDevicePositionAndOrientation(DeviceIds[0], loc, rot);
TrackerMesh->SetRelativeLocationAndRotation(loc, rot);
}