This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Pedestrians

Just like cars, each pedestrian is an entity and is bound to a node reference. The base class for pedestrians is called "Pedestrian".

ObjectMeshSkinned Settings

As a root node for pedestrian node reference there must be an ObjectMeshSkinned. As with cars, pedestrians must have a surface replicating a pedestrian's bounding box. This surface is required for pedestrian identification by means of intersection rays. A pedestrian's intersection mask should be 0x00000080.

Pedestrian Settings
Notice
For each pedestrian's ObjectMeshSkinned, a BodyRigid and its shapes are adjusted manually from Editor.

By default, pedestrian animation can have two options: "Animation Idle" and "Animation Walk". In the "Pedestrian" entity settings you can specify the following parameters:

  • Paths to files with animation.
  • The animation playback speed.
  • The minimum and maximum pedestrian speed.
  • The pedestrian turn speed.

Custom Animation

In case you want to change animation logic, you need to inherit a "Pedestrian" class and redefine the following methods:

  • Pedestrian::animation_init(), which performs animation initialization.
  • Pedestrian::animation_update(), which performs animation update.
Notice
These methods are called automatically. A Pedestrian::animation_update() method is called every frame.
Last update: 2017-07-03
Build: ()