1
Support / Re: [RELEASED] 2D ColliderGen extension for 2D Toolkit - Instant Polygon Colliders
« on: March 28, 2013, 12:16:42 pm »
Thank you for your interest in our extension!
In general: yes - You could use functionality contained in the plugin to calculate a polygon fence for a given image at runtime, but you would have to write some code for this yourself at this time. The plugin provides methods such as BinaryAlphaThresholdImageFromTexture(), TriangleFenceOutlineFromBinaryImage(), etc, that could be used for your purpose.
However, we have not yet tried modifying MeshColliders at runtime, but you could have a look at these forum posts here [1] [2]. The Unity engine itself could come with some performance-limitations in this case, so we suggest that you try out changing MeshColliders at runtime first to see if this fits your performance requirements.
If it does, feel free to cantact us if you need any help on the issue. Maybe we will put runtime-mesh-colliders on our roadmap for future updates, so that users won't need to write any additional code to achieve this.
King Regards,
Harald
[1] http://forum.unity3d.com/threads/32467-How-to-update-a-mesh-collider
[2] http://answers.unity3d.com/questions/171571/dynamic-mesh-collider.html
Quote
Is this plugin strictly in the editor, or does your plugins code have ANY run time functionality that we can utilize to achieve our goal?
In general: yes - You could use functionality contained in the plugin to calculate a polygon fence for a given image at runtime, but you would have to write some code for this yourself at this time. The plugin provides methods such as BinaryAlphaThresholdImageFromTexture(), TriangleFenceOutlineFromBinaryImage(), etc, that could be used for your purpose.
However, we have not yet tried modifying MeshColliders at runtime, but you could have a look at these forum posts here [1] [2]. The Unity engine itself could come with some performance-limitations in this case, so we suggest that you try out changing MeshColliders at runtime first to see if this fits your performance requirements.
If it does, feel free to cantact us if you need any help on the issue. Maybe we will put runtime-mesh-colliders on our roadmap for future updates, so that users won't need to write any additional code to achieve this.
King Regards,
Harald
[1] http://forum.unity3d.com/threads/32467-How-to-update-a-mesh-collider
[2] http://answers.unity3d.com/questions/171571/dynamic-mesh-collider.html