So I a made a script that lets the player grab a vertex, move it, and then update the mesh. To help prevent the player from trying to clip it through other objects I made it so the mesh/collider is constantly being updated. It works however there is an issue where it keeps falling into itself. So I tried updating the constraints to prevent this but it doesn't seem to help anything.


With the mesh being updated after the LMB is released: http://gifyu.com/images/withnocollisionprevetnion.gif (SE doesn't like non-imgur links apparently and they are too big for imgur).

With the mesh being updated in real time: http://gifyu.com/images/withcollisionprevetnion.gif

Also here is a gif showing how constraints on the RB don't solve the problem (I've tried freezing on different axes but those still cause issues too): http://gifyu.com/images/constprob.gif

So basically what can I do to prevent the object from moving when it's mesh/collider is being updated?

  • 1
    \$\begingroup\$ Does the edited object in question have a rigid body? That is, it is part of the physics simulation and obeys gravity. If so, simply freeze the rigidbody's constraints. If the motion is done via script, then disable the script. \$\endgroup\$ – Draco18s May 16 '16 at 4:09
  • \$\begingroup\$ @Draco18s Well part of the problem is if I try to freeze the constraints such as position or rotation then my vertex manipulation script breaks. As in I can't manipulate it properly. Also I added a new gif showing the issues with constraints. \$\endgroup\$ – Sie May 16 '16 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.