Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 2.5

COLUMN

Path Animation

Tell your Object3Ds where to go!

Issue: 2.5 (May/June 2004)
Author: Joe Nastasi
Article Description: No description available.
Article Length (in bytes): 7,711
Starting Page Number: 38
Article Number: 2519
Related Link(s): None

Excerpt of article text...

This month starts a series of articles that describes the design of a path animation library that facilitates the definition and execution of model movement along pre-defined paths. As with the character animation system described in the last four issues, it will be designed to be compatible with a yet-to-be-designed editor. Initially, we will treat the Path Animation library as a stand alone unit, but eventually we will combine it with the Character Animation library.

The Concept

The Path Animation library allows you to define a path for an Object3D to traverse. Pre-defined paths are mostly useful for models that are not controlled by the player, known as a Non-Playing Character or NPC. However, there may be instances where a player-controlled Object3D would require a pre-defined path. The paths are two-dimensional and only handle flat surfaces. The ability to handle uneven terrain and possibly a third dimension may be added later.

A Path is defined by a list of Waypoints. All movement is relative to the current position of the Object3D. When asked to play a path, the software looks for the next Waypoint in the Path list and proceeds to move to the location defined in the Waypoint. The orientation of the Object3D will turn towards this location during the movement.

WaypointClass

...End of Excerpt. Please purchase the magazine to read the full article.