-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch event in LandscapeLeft or LandscapeRight orientation. #14
Comments
Maybe you not need to fix hitTest method for landscape orientation. vuforiaManager?.prepare(with: .landscapeLeft) |
I wrote this functionality. If you want i can fork this project with rotation support, and later you can add this to your sample. But my question is about touchedNodWithLocationInView. Did i change it propperly? - (SCNNode*)touchedNodeWithLocationInView:(CGPoint)location {
CGPoint pos = location;
pos.x *= [[UIScreen mainScreen] nativeScale];
pos.y *= [[UIScreen mainScreen] nativeScale];
pos.y = _manager.viewport.size.height + _manager.viewport.origin.y - pos.y;
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if(orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeLeft){
pos.x += fabs( _manager.viewport.origin.x);
}
NSArray* results = [_renderer hitTest:pos options:nil];
return [[results firstObject] node];
} |
If you want to use in landscape mode only,
Otherwise, you might need to modify it. |
Do you know how to calculate position x and y used in hitTest method when vuforia and device work in landscape orientation ?
Regards, JH
The text was updated successfully, but these errors were encountered: