public override PShape3D CreateShape(GameObject root) { Fix64 r = CalculateRadius(); if (r > Fix64.zero) { Fix64Vec3 center = Fix64Vec3.zero; if (gameObject != root) { center = _pTransform.localPosition; } _shape = Parallel3D.CreateSphere(r, center); if (createUnityPhysicsCollider) { var collider = gameObject.AddComponent <SphereCollider>(); collider.radius = (float)radius; } return(_shape); } else { Debug.LogError("Invalid Size"); return(null); } }