PathEngine home previous: Placing obstructions ‑ using collision contextsnext: Agent rotation
Contents, Programmers Guide, Example Projects, Tutorials, Tutorial 2

Tutorial 2


This tutorial builds on the previous tutorial to add user control of the agent for movement around the environment.
Line collision is used to check collision for a moving agent against the boundaries of obstructed space.
A basic mechanism for sliding against obstacles is presented.

Agent rotation
Line collision and collision info
Translating the agent

When you run the application you should see a mesh rendered in the testbed, be able to move the camera, and place and move the agent and the obstacles as in the previous tutorial.

In addition, now you can rotate the agent by moving the mouse left and right.
(Which just changes the direction of the marker on the top of the agent.)
But also you can use the 'W','S','A' and 'D' keys to move the agent around.
Check that it is impossible to move the agent into a position overlapping the edge of the mesh or either of the obstructions.
Also check that the agent slides reasonably well against the mesh edges and against the obstructions.

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: Agent rotation