- Home /
How do I transform only the mesh I want in unity?
I made a plane with as many triangles as I want.
I want to deform only the collision triangle when the ball collides with my plane.
I In detail, I want the triangles on the plane to come up like a ball.
I created a collider through MeshCollider and detected a collision, but I do not know how each triangle moves.
Plz help me.
void Start()
{
filter = GetComponent<MeshFilter>();
filter.mesh = GenerateMesh(sizex, sizey, gridSizeX, gridSizeY);
meshc = gameObject.AddComponent(typeof(MeshCollider)) as MeshCollider;
}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "ball")
{
Debug.Log("ballatt");
}
}
[2]: /storage/temp/137821-img.png
Comment
Your answer
Follow this Question
Related Questions
Generate a highpoly sphere with mesh collider procedurally 2 Answers
Smoothing collisions with MeshColliders 0 Answers
Reusing Mesh 1 Answer
Partial meshcollider failure. Why does this happen? 2 Answers