Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Dynamic attachment
#3
Thank you very much for your reply!

I calculate new position of dragging object in OnMouseDrag() function. And run coroutine for next frame as you say:

Code:
void OnMouseDrag()
{

//  calculate new postion    

StartCoroutine(PosFix());

}

IEnumerator PosFix()
{
    yield return new WaitForEndOfFrame();
    if (rigBod && needChangePos)
       rigBod.MovePosition(newPosition);
    yield return null;
}

But this is not help.

And other question - why in your Chain demo you attaching TWO last control points to ball? I disabled second attachment to ball - and did not saw a difference.

I enabled "isKinematic"  during dragging - and this is help. But not sure what this is good solution
Reply


Messages In This Thread
Dynamic attachment - by Caduceus - 23-04-2021, 08:00 AM
RE: Dynamic attachment - by josemendez - 23-04-2021, 08:43 AM
RE: Dynamic attachment - by Caduceus - 23-04-2021, 09:08 AM
RE: Dynamic attachment - by josemendez - 23-04-2021, 09:21 AM