Assign the new object an initial velocity of normal * initialSpeed Compute the face direction as the cross product of two of its edges (there are normals stored with the mesh, but they're vertex normals rather than face normals)Ħ. Assign the mesh data for the triangle in question to the new meshĥ. Create a mesh for the game object (you'll need a filter and a renderer)Ĥ. Here's how I would most likely proceed:ģ.
BOOLEAN CHEETAH3D CODE
When they are imported into Unity are they converted to triangle meshes?Ī lot of questions I know - any help would be much appreciated.Ĭlick to expand.I'm fairly certain that Unity converts all polygons with more than 3 sides into triangles on import.Īs for 'exploding a mesh', I haven't actually done this in Unity, but I've written similar code in other projects. This turns me to my final question which is 3D in general (I am very new to this area.) When I export my Model from Cheetah3D a lot of the polygons have 4 vertices. Would I be correct to suggest that vertices, vertices and vertices would be the first poly/face?ĭo I then need to Normalize the Cross Product on the Vectors to get the face direction? Then I had a look at Mesh.vertices which makes a little more sense as it returns Vector3 (which I assume is the coordinates of the vertices). I had a brief look at Mesh.GetTriangles but I'm a little confused as this returns int! - so I think this is a non starter.
Is it possible to 'break' a Mesh down into its individual polygons and place them into an array? What I would like to do with a basic mesh is 'explode' its polygons off at random velocity in the direction of the polygon faces.