Search Unity

Procedural capsule mesh

Discussion in 'Scripting' started by jesta, Dec 4, 2012.

  1. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    294
    I need to create capsule shaped meshes from script for a tool I'm developing. I already made scripts for procedural cylinders and spheres, but simply combining them doesn't work properly.

    I can't use GameObject.CreatePrimitive(PrimitiveType.Capsule); because I need total control on the mesh complexity. Would someone have some insight on this?

    Thanks!
     
  2. Asii

    Asii

    Joined:
    Sep 28, 2012
    Posts:
    53
    if i understand it right you could create a cylinder and make it a prefrab. then use the Instantiate. dont know if this helped you