PathEngine home previous: Placing anchorsnext: Marking surface types
Contents, Tools, Maya Exporter, Placing pinned shapes

Placing pinned shapes

'Pinned shapes' are two dimensional convex shapes, pinned to the surface of a ground mesh.
Refer to this page (in the Content Creators Guide), for a general explanation about this feature.

Pinned shapes are attached to the ground mesh by an anchor, and must satisfy PathEngine's constraints on placed shapes. (The shape's anchor provides an origin, and the constraint on shape coordinates relates to the coordinates of the shape vertices relative to this origin.)

Representing pinned shapes in Maya

Pinned shapes are represented within Maya with 'periodic linear curves', (i.e. periodic nurbs curves with degree 1), with at least 3 segments.

Creating a pinned shape

First set the EP curve tool to create linear curves, as when creating anchors.

Now lay down the shape vertices, without closing the shape (and press 'enter' to finish shape creation).

Now close the curve by selecting it and then clicking Edit Curves Menu -> Open/Close Curves.

Naming shapes

Pinned shapes must be assigned names with either an 'obstacle_' or 'baseObstacle_' prefix.
(Specifically, the relevant name here is the name of the object transform node.)
Objects without this name prefix will be ignored on export.
'obstacle_' marks shapes as 'named obstacles'. 'baseObstacle_' marks shapes as 'base obstacles'.

Base obstacles are obstacles that are effectively 'burnt in' to the base mesh, and that will always apply to pathfinding. Named obstacles, on the other hand, essentially record information about potential object placement that can be looked up against the mesh at run-time.
(So note that you won't actually see named obstacles when loading up a 'vanilla' testbed application that doesn't include code to explicitly look these up and display them.)

In the case of named obstacles, the obstacle ID is taken from the remainder of the object name, after the prefix (so placing a pinned shape with the name 'obstacle_door1_open' will create a named obstacle with ID 'door1_open').

Attaching pinned shapes to anchors

Pinned shapes are attached to anchors by position in the Maya DAG.
Specifically, a pinned shape must be linked directly underneath an anchor (otherwise it will be ignored).


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Marking surface types