Example #1
0
 public void AddSphereCollider(ref MPGPSphereColliderData v)
 {
     if (enabled)
     {
         m_sphere_colliders.Add(v);
     }
 }
Example #2
0
 static public void BuildSphereCollider(ref MPGPSphereColliderData cscol, Transform t, ref Vector3 center, float radius, int id)
 {
     cscol.shape.center      = t.localToWorldMatrix * new Vector4(center.x, center.y, center.z, 1.0f);
     cscol.shape.radius      = radius * t.localScale.x;
     cscol.info.aabb.center  = t.position;
     cscol.info.aabb.extents = Vector3.one * cscol.shape.radius;
     cscol.info.owner_objid  = id;
 }