Allow mocap bodies to be loaded by the Unity plugin.
PiperOrigin-RevId: 558735711 Change-Id: Ibc9a81cbf8ec4b979d5b325c822c1bffc1408509
This commit is contained in:
committed by
Copybara-Service
parent
ed4bb2aab5
commit
ef699d4b6d
@@ -36,7 +36,7 @@ public class MjBodyVectorSensor : MjBaseSensor {
|
||||
FrameAngAcc,
|
||||
}
|
||||
public AvailableSensors SensorType;
|
||||
public MjBody Body;
|
||||
public MjBaseBody Body;
|
||||
|
||||
[Tooltip("Should the Frame sensors use the inertial or the regular frame of reference.")]
|
||||
public bool UseInertialFrame;
|
||||
@@ -64,9 +64,9 @@ public class MjBodyVectorSensor : MjBaseSensor {
|
||||
}
|
||||
if (mjcf.Name.Contains("frame")) {
|
||||
UseInertialFrame = mjcf.HasAttribute("body"); // as opposed to xbody
|
||||
Body = mjcf.GetObjectReferenceAttribute<MjBody>("objname");
|
||||
Body = mjcf.GetObjectReferenceAttribute<MjBaseBody>("objname");
|
||||
} else {
|
||||
Body = mjcf.GetObjectReferenceAttribute<MjBody>("body");
|
||||
Body = mjcf.GetObjectReferenceAttribute<MjBaseBody>("body");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user