EddyVerbruggen / nativescript-ar

Augmented Reality NativeScript plugin
https://www.nativescript.org/blog/preview-of-augmented-reality-in-nativescript
MIT License
118 stars 36 forks source link

propagate gestures up scene hierarchy #71

Closed nickolanack closed 4 years ago

nickolanack commented 4 years ago

-expose getWorldPosition/setWorldPosition -refactor pan/pinch/rotate to use getHitTargetWithProperty that traverses scene toward root -update ARCommonNode to apply parent onTap/onLongPress if undefined -rewrite scenePan method to pan x, and y local to camera rotation and apply world offset back to node

-fix ios setWorldPosition method to use ios.worldPosition instead of conversion since SCNNode will do that

69

EddyVerbruggen commented 4 years ago

omg I just tested the changes on iOS and it works. like. a. boss. 😎

EddyVerbruggen commented 4 years ago

Looks like we lost tap events on iOS in the solarsystem demo (except for Earth's clouds) because our code assumed node names with a tap handler started with {. That's fixed now. Will check Android as well.