Tuesday, June 28, 2016

Top Down Stealth Toolkit v4.10 Basics: Vision Arcs

[The following information is based on the v4.10 of the Top Down Stealth Toolkit & hence may not remain entirely relevant in later versions. For information regarding the implementation of vision arcs in the latest version of the toolkit, check out this post in the official support thread in the Unreal Engine forums: https://forums.unrealengine.com/showthread.php?97156-Top-Down-Stealth-Toolkit&p=459450&viewfull=1#post459450]

The vision arcs in Top Down Stealth Toolkit are created using custom meshes & updated at runtime to match & resize based on the obstacles in their path. The vision arcs serve the aesthetic purposes of AI threat detection, while the functional part is executed elsewhere, thus serving as two modular parts that make up a whole. As a result, it is possible to edit the base properties of the vision arcs without worrying about AI logic. 

The vision arcs exist as parts within the AI Bot logic. The following parameters can be used to edit their properties [screenshot below]:

1. DisplayVisionArc?: Use this parameter to turn on/off the vision arcs. This can be used to disable vision arcs for certain types of bots, or to compliment certain bot states such as stunned or deactivated. Turning off the vision arcs also greatly improves the performance.

2. UseTranslucentVisionArc?: Turned on by default, this parameter determines whether the vision arcs are translucent or opaque. Turning it off could yield slight performance improvements.

3. VisionRange: The vision range parameter determines both the visual range of the vision arc as well as the associated threat detection range for the bots. This can be used to produce different types of vision arcs for different types of bots. For example, a melee bot might have less vision range, while a ranged bot could have large vision range.

4. HalfVisionAngle: This parameter can be used to control the angular range of the vision arcs and hence can be used to produce different types of vision arcs for different types of bots. However increasing it to high values can reduce performance.