PathEngine home previous: Validation errorsnext: Placing obstacles
Contents, Tools, Max Exporter, Placing anchors

Placing anchors

'Anchors' are provided as way to represent positions on a mesh such that they can remain valid across changes to the mesh. See Anchors and Pinned Shapes for general information about anchors.

Creating anchors in 3DS Max

Any 3DS Max object can be used as an anchor but because anchors represent information that is conceptually in the form of a vertical line and a direction, it makes sense to choose an object that corresponds visually to this line.
By convention, an inverted L shape is used when the direction (or orientation) associated with an anchor is important, and a simple vertical line can be used when this direction is not important.

Whatever type of object is used, the exporter will obtain a vertical line from the anchor by taking the x and y coordinates of the anchor's origin and the z start and end coordinates of the anchor's world bounding box.
The anchor's direction is taken from the direction of the x axis in the objects local coordinate system, as shown below.

Marking nodes as anchors

In order to be recognised as an anchor a node must be given a name prefixed with either 'anchor_' or 'terrainAnchor_' (with the anchor treated as either a standard anchor or a terrain anchor accordingly).
The part of the anchor's name after the prefix will be used as the name under which that anchor is saved.
An anchor object named 'anchor_PlayerStartPoint', for example, will add an anchor that can be queried in-game as 'PlayerStartPoint'.

The plugin searches the scene, on export, for any nodes marked in this way.
The way in which the scene is searched depends on whether you are using 'Export selected' or 'Export named ground'.

When you click 'Export selected', the exporter searchs the set of nodes that are immediate children to nodes being exported.
When exporting in this way, anchors not linked directly under one of the selected nodes will be ignored.

When you click 'Export named ground', the exporter simply searches the entire scene for nodes with the 'anchor_' prefix.
This enables you to do things like organising anchors into hierarchies, or to have dummy objects linked between ground meshes and subsets of placed anchors.

Anonymous anchors

Any anchor object with a '#' character straight after the anchor suffix (e.g. "anchor_#01") is considered an 'anonymous anchor'. (Such anchors will not be saved out with the mesh, but can still be used to place obstacles.)

Examples

Refer to Example Geometry for a basic example mesh with anchors.
You can also look at the playable demo levels.


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Placing obstacles