- Home /
Dynamic physics on procedural mesh
I built a Mesh generation Script that I assign to an empty Game Object, which then creates from scratch triangles on a Mesh Filter component and renders using Mesh Renderer.
Everything works great, one thing I am trying to resolve is to how to then convert this mesh to respond to physics.
An example I can think of is Unity's Tree where branches respond to wind. Is there a way to get similar effect without moving the vertices manually? (My mesh extrudes around a spline so maybe I can bend the spline to get the same effect?)
But another effect is to hang a heavy object on this branch and have it bend towards the ground.
I can't think to inifinitely many scenarios, so maybe I should build around these two cases, but if there is a more general solution I would like to know about it.
Thanks!
Answer by Cameron_SM · Jun 19, 2013 at 11:26 AM
There's no general solution for this. Unity's built in Physics is a rigidbody system, it doesn't do soft body deformation like you're describing (the Tree system is different again, and custom built to do just wind).
Your answer
Follow this Question
Related Questions
2D 360 degress platformer example needed 0 Answers
How can i draw a circle pie? 2 Answers
rigid body Clone Instance not behaving like original 1 Answer
Rigidbody projectile gets stuck in two-sided Procedural mesh / mesh collider 0 Answers
How to raycast correctly on a generated mesh in both play and edit modes 0 Answers