Closed hshapley closed 4 weeks ago
The hit testing on parent
in made in case of non AR move.
Imagine you have the follow parenting: anchor node (editable) > plane node (not editable) > model node (editable):
If you want the model node to move on its parent plane, you will look at the hit test position in the parent so the model node can move into its parent plane without moving the anchor.
If the plane is touched then the move will be transfered to its parent anchor so everything will move at the same time.
The null pointer fix is included in v2.2.1
When dragging a Node in ARSceneView 2.0.3, it can crash with the exception
java.util.NoSuchElementException: Collection contains no element matching the predicate.
This is because in Node.kt on line 873 (in onMove), it usesfirst
instead offirstOrNull
. If it used the latter, then the null check would work, but since it just usesfirst
, it throws an exception instead. In PoseNode line 27, it usesfirstOrNull
, so no issue there. I'm also not sure whether the logic is correct for the predicate - checkingit.node == parent
seems a little strange. Wouldn't it be better to checkit.node == this
, or checking both conditions?