How-To: Build a KeyPath

KeyPaths are explained in our documentation. When correctly formed, a key path unambiguously describes the location of a leaf segment in the scene graph hierarchy. A key to the leaf node itself is insufficient because it could theoretically be included in multiple locations in the scene graph.

A key path is needed to correctly take into account cameras and matrix transforms when converting coordinates between systems. The key path is a collection of keys, going from the leaf to the root of the scene graph. The key path can omit some of the keys between the leaf and the root, but MUST contain all the include link between leaf and root.

If you are using Sprockets, consider using a function called GetKeyPath().

 

Check out an example with sample code in our forum post.