예제 #1
0
        /// <summary>
        /// Find the debug rendering mesh filters for a given shape (if debug rendered).
        /// </summary>
        public static MeshFilter[] GetMeshFilters(Shape shape)
        {
            ShapeDebugRenderData debugRenderData = null;

            if (shape == null || (debugRenderData = shape.GetComponent <ShapeDebugRenderData>()) == null)
            {
                return new MeshFilter[] { }
            }
            ;

            return(debugRenderData.MeshFilters);
        }
예제 #2
0
 /// <summary>
 /// Capsule visual is three game objects (2 x half sphere + 1 x cylinder),
 /// the size has to be updated to all of the children.
 /// </summary>
 public override void OnSizeUpdated()
 {
     ShapeDebugRenderData.SetCapsuleSize(gameObject,
                                         (Shape as Collide.Capsule).Radius,
                                         (Shape as Collide.Capsule).Height);
 }