User Tools
Sidebar
Using RAIN
AI Characters
Environment
rainelements:visualsensor
Table of Contents
Visual Sensor
Properties
- Use Unity Messages (Advanced): Whether the AI is initialized and updated by Unity or done manually.
- Use Fixed Update (Advanced): Whether the AI responds to Unity Update or FixedUpdate messages. Only valid if Use Unity Messages is checked.
- Is Active (Advanced): Whether the AI is currently updating.
- Body: The GameObject that the AI will move and animate.
- Senses: The type of senses used. Currently RAIN supports only one senses type, Basic Senses (this one). If you create your own Custom Senses you can select it here.
- Add Sensor: Allows you to add a sensor to this AI. Currently RAIN supports an Audio Sensor and a Visual Sensor. If you create your own Custom Sensor you can select it here.
- Sensor Name: The name of the sensor. Useful for specifying a specific sensor when using a Detect node or in code.
- Is Active (Advanced): Whether the sensor is currently detecting aspects.
- Mount Point: Where the sensor is mounted. If it is empty it will be mounted to the AI body.
- Position Offset (Advanced): How much the sensor's position is offset from its mount point.
- Angle Offset (Advanced): How much the sensor's orientation is offset from its mount point.
- Horizontal Angle: The angle around the sensor where aspects will be detected.
- Vertical Angle: The angle above and below the sensor where aspects will be detected.
- Range (Advanced): The distance from the sensor where aspects will be detected.
- Can Detect Self (Advanced): Whether to include the AI body when detecting aspects.
- Line of Sight (Advanced): Whether to do a raycast to determine line of sight with the detected aspect.
- Line of Sight Mask (Advanced): The layer mask to use when testing line of sight.
- Add Filter (Advanced): Adds a filter to your sensor. Currently RAIN supports only one filter type, Nearest X Filter. If you create your own Custom Filter you can select it here.
Actions
- Select All: Selects all of the sensors that are on this AI.
- Remove Selected: Removes the selected sensors on this AI.
Usage
Basic Senses is used to detect Audio Aspects and Visual Aspects in your Unity scene. This is done by adding Visual and Audio Sensors to your AI and using them through the Detect node.
Once you have added a sensor, you can select it by left clicking on its title bar. You can select multiple sensors by holding the Ctrl key down.
You can also move, rotate, and scale any selected sensors by using the transform tools.
You can also change a visual sensors effective area by modifying its Horizontal Angle and Vertical Angle. This allows you to create cone and semi circle sensors instead of spheres.
Code
See Also
rainelements/visualsensor.txt · Last modified: 2022/08/13 18:13 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported