diff --git a/cocos/vr/CCVRGenericHeadTracker.cpp b/cocos/vr/CCVRGenericHeadTracker.cpp index 8e5ef30c80..b72266a6b0 100644 --- a/cocos/vr/CCVRGenericHeadTracker.cpp +++ b/cocos/vr/CCVRGenericHeadTracker.cpp @@ -127,6 +127,8 @@ Vec3 lowPass(const Vec3& input, const Vec3& prev) #endif // (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + static Mat4 getRotateEulerMatrix(float x, float y, float z) { x *= static_cast(M_PI) / 180.0f; @@ -160,6 +162,8 @@ static Mat4 getRotateEulerMatrix(float x, float y, float z) return matrix; } +#endif + VRGenericHeadTracker::VRGenericHeadTracker() : _localPosition(Vec3::ZERO) {