43 lines
1.3 KiB
C#

using UnityEngine;
namespace NanoBrain.Unity.Braitenberg {
/// <summary>
/// A Braitenberg style vehicle with two sensors and two motors, powered by a Nanobrain
/// </summary>
[RequireComponent(typeof(Rigidbody))]
public class Vehicle : MonoBehaviour {
/// <summary>
/// The NanoBrain::Cluster controlling the vehicle
/// </summary>
[Tooltip("The NanoBrain Cluster controlling the vehicle")]
public Cluster brain;
[Header("Motors")]
/// <summary>
/// The left motor
/// </summary>
[Tooltip("The left motor")]
public Motor motorLeft;
/// <summary>
/// The right motor
/// </summary>
[Tooltip("The right motor")]
public Motor motorRight;
[Header("Sensors")]
/// <summary>
/// The front-left sensor
/// </summary>
/// When the vehicle has only one sensor, this can be used as the single sensor
[Tooltip("The front-left sensor")]
public Sensor sensorLeft;
/// <summary>
/// The front-right sensor
/// </summary>
/// When the vehicle has only one sensor, this can be set to null
[Tooltip("The front-right sensor")]
public Sensor sensorRight;
}
}