24 lines
707 B
C#
24 lines
707 B
C#
using UnityEngine;
|
|
|
|
namespace NanoBrain.Braitenberg {
|
|
|
|
[RequireComponent(typeof(Rigidbody))]
|
|
public class Vehicle : MonoBehaviour {
|
|
public Unity.ClusterPrefab brain;
|
|
|
|
[Header("Motors")]
|
|
public Motor motorLeft;
|
|
public Motor motorRight;
|
|
|
|
[Header("Sensors")]
|
|
public Sensor sensorLeft;
|
|
public Sensor sensorRight;
|
|
|
|
void FixedUpdate() {
|
|
// //Debug.Log($"L: {sensorLeft.output} R: {sensorRight.output}");
|
|
// //Debug.Log($"L: {motorLeft.speed} R: {motorRight.speed}");
|
|
// Debug.Log($"L: {motorLeft.wheelCollider.rpm} R: {motorRight.wheelCollider.rpm}");
|
|
}
|
|
}
|
|
|
|
} |