Forum Discussion
saviornt
11 years agoProtege
UE4, GearVR + Rift, will this work?
In the GameMode:
- Event BeginPlay
- Branch | Condition: Is in Low Persistence Mode
-- True
--- Set HUDClass: OculusHUD
-- False
--- Set HUDClass: Gear VR Global Menu
I'm sure you can see where I am going with this, so will this work? (I don't have a phone nor gearVR to test it)
- Event BeginPlay
- Branch | Condition: Is in Low Persistence Mode
-- True
--- Set HUDClass: OculusHUD
-- False
--- Set HUDClass: Gear VR Global Menu
I'm sure you can see where I am going with this, so will this work? (I don't have a phone nor gearVR to test it)
4 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionAre you trying to determine if the user is wearing a Rift or a Gear VR? I don't think that is the way to do it.
Also, Gear VR uses low persistence as well. - saviorntProtege
"cybereality" wrote:
Are you trying to determine if the user is wearing a Rift or a Gear VR? I don't think that is the way to do it.
Also, Gear VR uses low persistence as well.
Yea, trying to determine which device is being used. I didn't know that the Gear used LP... is there a way to distinguish the two devices?
I did see that Rama had a plugin that had an OS determination feature, should this be the way to go?
edit: Found it, there is a "Get Platform Name" Node in blueprints that I can use \o/ -- it should work in theory, but theory I have found is much different than real-life. - opampProtegeThe correct way would be to call GEngine->HMDDevice->GetHMDDeviceType();
https://docs.unrealengine.com/latest/INT/API/Runtime/HeadMountedDisplay/EHMDDeviceType__Type/index.html
exampleif ( GEngine->HMDDevice.IsValid() ) //check pointer is valid
{
EHMDDeviceType result = GEngine->HMDDevice->GetHMDDeviceType();
if ( result == EHMDDeviceType::DT_OculusRift ) UE_LOG(LogTemp, Warning, TEXT("Device is Rift"));
else if ( result == EHMDDeviceType::DT_GearVR ) UE_LOG(LogTemp, Warning, TEXT("Device is GearVR"));
else UE_LOG(LogTemp, Warning, TEXT("Device is Other"));
}
else UE_LOG(LogTemp, Error, TEXT("No device found!")); - saviorntProtegeThat gives me an idea where to look, ty sir. I may open up the hood and make it blueprintable :lol:
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 6 years ago
- 2 years ago
- 3 years ago