Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Arcore 1.2 1.4 1.6 with unreal 4.21 joystick problems #47

Closed
ParaO opened this issue Jan 18, 2019 · 11 comments
Closed

Arcore 1.2 1.4 1.6 with unreal 4.21 joystick problems #47

ParaO opened this issue Jan 18, 2019 · 11 comments

Comments

@ParaO
Copy link

ParaO commented Jan 18, 2019

I have created 1st person example map. I have built it to andorid with joysticks on. Everything works fine...BUT...when I enable Google ARCore plugin joysticks prevent looking up and down?!?!? Everything else works like it should...what can i do? Are there any google developers reading these problems...? Can Someone help me...Thanks.

@bopangzz
Copy link
Contributor

When you use ARCore, camera position and rotation are override by ARCore tracking, which is the general behavior in AR app. What is the use case you are trying to do with ARCore and joystick work together?

@ParaO
Copy link
Author

ParaO commented Jan 20, 2019

I am trying to build app with arcore and normal. 1st level should be augmented and second normal. Everything else (rotation left right and movement) works as expected but up and down is blocked. Is there a reason why it is blocked? This hapens with arcore 1.2 1.4 and 1.6...thanks for the help!

@ParaO ParaO changed the title Arcore 1.4 with unreal 4.21 joystick problems Arcore 1.2 1.4 1.6 with unreal 4.21 joystick problems Jan 21, 2019
@ParaO
Copy link
Author

ParaO commented Jan 21, 2019

When you use ARCore, camera position and rotation are override by ARCore tracking, which is the general behavior in AR app. What is the use case you are trying to do with ARCore and joystick work together?

@ParaO ParaO closed this as completed Jan 21, 2019
@ParaO ParaO reopened this Jan 21, 2019
@ParaO
Copy link
Author

ParaO commented Jan 21, 2019

bopangzz any news from this? Main thing for us is that we could close the arsession and all tracking when going to another level. I have tried to override everything from player controls,hud,gamemode, pawn etc. with no success...

@bopangzz
Copy link
Contributor

bopangzz commented Jan 21, 2019 via email

@ParaO
Copy link
Author

ParaO commented Jan 21, 2019

Thanks for the quick response. Easy way of testing it...make a firstperson template. Enable arcore plugin 1.2 1.4 or 1.6 -> compile the project and try to look up or down. all the other movements are ok. I tried disabling the lock to hmd but the results remain the same.

@ParaO
Copy link
Author

ParaO commented Jan 23, 2019

Hi bopangzz. Have you tried the plugin behavior yet? Sorry for the pressure but our client is waiting for the solution. If it is a big problem (which I dont belive...) I think we need to have a look to Unity...?Thanks again!

@bopangzz
Copy link
Contributor

bopangzz commented Jan 23, 2019 via email

@bopangzz
Copy link
Contributor

bopangzz commented Jan 24, 2019

So I took a look today. It is indeed an issue in the ARCore plugin. Thank you for reporting it!

You can easily fixed this if you have source code access to the Engine code, in GoogleARCoreXRTrackingSystem.cpp, change the code in the following functions:

bool FGoogleARCoreXRTrackingSystem::IsHeadTrackingAllowed() const
{
#if PLATFORM_ANDROID
	if (ARCoreDeviceInstance->GetIsARCoreSessionRunning()) {
		return true;
	}
#endif

	return false;
}
bool FGoogleARCoreXRTrackingSystem::GetCurrentPose(int32 DeviceId, FQuat& OutOrientation, FVector& OutPosition)
{
	if (DeviceId == IXRTrackingSystem::HMDDeviceId && ARCoreDeviceInstance->GetIsARCoreSessionRunning())
	{
		OutOrientation = CachedOrientation;
		OutPosition = CachedPosition;
		return true;
	}
	else
	{
		return false;
	}
}

Basically add the check to return the pose only when ARCore Session is running.

I will make sure this got fixed in the next release.

@ParaO
Copy link
Author

ParaO commented Jan 24, 2019

Thanks a lot! Works like a charm😉. I ll be waiting for new relase as well...

@ParaO ParaO closed this as completed Jan 24, 2019
@fredsa
Copy link
Contributor

fredsa commented May 14, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants