Example #1
0
        public static void Create(Transform parent, List <Link.Collision> collisions = null)
        {
            GameObject collisionsObject = new GameObject("Collisions");

            collisionsObject.transform.SetParentAndAlign(parent);
            UrdfCollisions urdfCollisions = collisionsObject.AddComponent <UrdfCollisions>();

            collisionsObject.hideFlags = HideFlags.NotEditable;
            urdfCollisions.hideFlags   = HideFlags.None;

            if (collisions != null)
            {
                foreach (Link.Collision collision in collisions)
                {
                    UrdfCollision.Create(urdfCollisions.transform, collision);
                }
            }
        }
        public void AddCorrespondingCollision()
        {
            UrdfCollisions collisions = GetComponentInParent <UrdfLink>().GetComponentInChildren <UrdfCollisions>();

            UrdfCollision.Create(collisions.transform, geometryType, transform);
        }