Add a child node to the node of a VR Tracker¶
In this script a box is added as child to the node of a VR tracker.
vr/attachToTracker.py¶
1# © 2024 Autodesk, Inc. All rights reserved.
2
3# Get the first tracker
4tracker = vrDeviceService.getVRDevice("tracker-1")
5
6# Create a red box
7box = createNode("Transform3D", "TrackerBox", False)
8box.addChild(createBox(100, 100, 100, 1, 1, 1, 1.0, 0.0, 0.0, 0.0))
9
10# Attach the box to the tracker
11constraint = vrConstraintService.createParentConstraint([tracker.getNode()], box, False)