MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / CookCollision

Method CookCollision

Source/Engine/Physics/CollisionData.cs:22–31  ·  view source on GitHub ↗

Cooks the mesh collision data and updates the virtual asset. action cannot be performed on a main thread. [Deprecated on 16.06.2022, expires on 16.06.2024] Can be used only for virtual assets (see and ). The collision data type. The so

(CollisionDataType type, Vector3[] vertices, uint[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255)

Source from the content-addressed store, hash-verified

20 /// <param name="convexVertexLimit">The convex mesh vertex limit. Use values in range [8;255]</param>
21 /// <returns>True if failed, otherwise false.</returns>
22 [Obsolete("Use CookCollision with Float3 and Float2 parameters instead")]
23 public bool CookCollision(CollisionDataType type, Vector3[] vertices, uint[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255)
24 {
25 if (vertices == null)
26 throw new ArgumentNullException();
27 var tmp = new Float3[vertices.Length];
28 for (int i = 0; i < tmp.Length; i++)
29 tmp[i] = vertices[i];
30 return CookCollision(type, tmp, triangles, convexFlags, convexVertexLimit);
31 }
32
33 /// <summary>
34 /// Cooks the mesh collision data and updates the virtual asset. action cannot be performed on a main thread.

Callers

nothing calls this directly

Calls 1

CookCollisionFunction · 0.85

Tested by

no test coverage detected