|
|
|
|
|
|
/// </summary>
|
|
|
|
public override void CollectObservations(VectorSensor sensor) |
|
|
|
{ |
|
|
|
goalSensor = this.GetComponent<GoalSensorComponent>(); |
|
|
|
var cubeForward = m_OrientationCube.transform.forward; |
|
|
|
|
|
|
|
//velocity we want to match
|
|
|
|
|
|
|
//avg body vel relative to cube
|
|
|
|
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(avgVel)); |
|
|
|
//vel goal relative to cube
|
|
|
|
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(velGoal)); |
|
|
|
goalSensor.AddGoal(m_OrientationCube.transform.InverseTransformDirection(velGoal)); |
|
|
|
goalSensor = this.GetComponent<GoalSensorComponent>(); |
|
|
|
goalSensor.AddGoal(m_OrientationCube.transform.InverseTransformPoint(m_Target.transform.position)); |
|
|
|
|
|
|
|
RaycastHit hit; |
|
|
|