Skip to content

Commit

Permalink
Set Node parent to null when destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGorisse committed Dec 7, 2023
1 parent 0356d47 commit 31a0952
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions sceneview/src/main/java/io/github/sceneview/node/Node.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1004,18 +1004,9 @@ open class Node(
* Detach and destroy the node and all its children.
*/
open fun destroy() {
parent = null
transformManager.destroy(entity)
}

/**
* Used to keep track of data for detecting if a tap gesture has occurred on this node.
*/
private data class TapTrackingData(
// The node that was being touched when ACTION_DOWN occurred.
val downNode: Node,
// The screen-space position that was being touched when ACTION_DOWN occurred.
val downPosition: Vector3
)
}

interface OnNodeGestureListener : GestureDetector.OnGestureListener,
Expand Down

0 comments on commit 31a0952

Please sign in to comment.