Skip to content

Commit 517e947

Browse files
committed
plane detection has now also both relative and absolute positions
1 parent d1062a8 commit 517e947

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ios/RCTARKit.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,12 @@ - (void)renderer:(id <SCNSceneRenderer>)renderer didRenderScene:(SCNScene *)scen
467467

468468

469469
- (NSDictionary *)makePlaneDetectionResult:(SCNNode *)node planeAnchor:(ARPlaneAnchor *)planeAnchor {
470+
470471
return @{
471472
@"id": planeAnchor.identifier.UUIDString,
472473
@"alignment": @(planeAnchor.alignment),
473-
@"position": vectorToJson(node.position),
474+
@"position": vectorToJson([self.nodeManager getRelativePositionToOrigin:node.position]),
475+
@"positionAbsolute": vectorToJson(node.position),
474476
// node is deprecated
475477
@"node": vectorToJson(node.position),
476478
@"center": vector_float3ToJson(planeAnchor.center),

0 commit comments

Comments
 (0)