Question by
no_reality · Nov 02, 2015 at 03:41 PM ·
meshragdoll
How to get mesh for ragdoll?
Hello everyone. this is my code:
function OnCollisionEnter(other : Collision) {
...
...
...
var mesh:Mesh = skin[i].GetComponent.<SkinnedMeshRenderer>().sharedMesh;
var triangles:int[] = mesh.triangles;
var vertices:Vector3[] = mesh.vertices;
var uv:Vector2[] = mesh.uv;
var dir:Vector3 = skin[i].transform.InverseTransformDirection(globalBulletDir);
var orig:Vector3 = skin[i].transform.InverseTransformPoint(other.transform.position);
This code in Rigidbody for bone. It worked well, I can shoot him and caused the bullet holes for texture. But It is out of order when I disabled Animator.
function death() {
var controller : Animator = GetComponent.<Animator>();
controller.enabled = false;
}
I need disabled Animator to make death effect.
Comment
Your answer
Follow this Question
Related Questions
Part of Mesh stuck to random point in the air. Please help! 0 Answers
Vertex coordinates of mesh imported from Blender as fbx are all equal to 0,0,0? 0 Answers
Mesh Peeling ,Dynamic Mesh Coiling 0 Answers
Correction for a (real-life) projection on object. 0 Answers
Deformation and jitter when y position over a few thousands units 0 Answers