Refactor: separate buffer indexing and swizzling.
This also fixes a sensor data reading bug: previously, _sensorIndex was multiplied by 3 by MjEngineTool. PiperOrigin-RevId: 451699887 Change-Id: I864bcbf8159857764854b25311a26ec5672125d9
This commit is contained in:
committed by
Copybara-Service
parent
5cc73c30bf
commit
02f300c762
@@ -57,7 +57,7 @@ public class MjGeomVectorSensor : MjBaseSensor {
|
||||
}
|
||||
|
||||
public override unsafe void OnSyncState(MujocoLib.mjData_* data) {
|
||||
SensorReading = MjEngineTool.UnityVector3(data->sensordata, _sensorAddress);
|
||||
SensorReading = MjEngineTool.UnityVector3(data->sensordata + _sensorAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user