public override PShape3D CreateShape(GameObject root) { Fix64Vec3 s = CalculateSize(); if (s != Fix64Vec3.zero) { Fix64Vec3 center = Fix64Vec3.zero; Fix64Quat rotation = Fix64Quat.identity; if (gameObject != root) { center = _pTransform.localPosition; rotation = _pTransform.localRotation; } _shape = Parallel3D.CreateCube(s.x, s.y, s.z, center, rotation); if (createUnityPhysicsCollider) { var collider = gameObject.AddComponent <BoxCollider>(); collider.size = (Vector3)size; } return(_shape); } else { return(null); } }