Version 2.1.2: Python bindings, OBJ assets support, bugfixes.

PiperOrigin-RevId: 434731612
Change-Id: I0cfda3e7a3d1c72036764986efc252ffa1b8c6b0
This commit is contained in:
Saran Tunyasuvunakool
2022-03-15 14:04:44 +00:00
parent 175d25cd9f
commit 3577e2cf8b
304 changed files with 23906 additions and 1013 deletions
+8 -5
View File
@@ -42,15 +42,18 @@ public class MjGeomEditor : MjShapeComponentEditor {
Debug.LogError("This geom already has a Body parent.", geom.GetComponentInParent<MjBody>());
return;
}
var parent = new GameObject(geom.gameObject.name + " Body").transform;
var parent = new GameObject(geom.gameObject.name + " Body").AddComponent<MjBody>().transform;
parent.position = geom.transform.position;
geom.transform.parent = parent;
var root = geom.transform.root;
if (root != geom.transform) {
parent.parent = geom.transform.parent;
}
parent.gameObject.AddComponent<MjBody>();
var joint = new GameObject("Free Joint").AddComponent<MjFreeJoint>();
joint.transform.parent = parent;
geom.transform.parent = parent;
var joint = new GameObject("Free Joint").AddComponent<MjFreeJoint>().transform;
joint.position = geom.transform.position;
joint.parent = parent;
}
[MenuItem("CONTEXT/Collider/Add a matching MuJoCo geom")]
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "Mujoco.Editor",
"rootNamespace": "",
"references": [
"Mujoco"
"Mujoco.Runtime"
],
"includePlatforms": [],
"excludePlatforms": [],