16-05-2018, 04:32 PM
(This post was last modified: 16-05-2018, 04:32 PM by josemendez.)
(16-05-2018, 04:05 PM)VirtualCucumber Wrote: I had it simulate after fixed update at first but when i started pinning physics objects to it, the objects would not react.
Yes, as the rope is being simulated after regular physics, so rigidbodies will ignore the rope. You should use OnStepBegin then, to make sure the order in which things happen each FixedUpdate() is this:
- The object moves (your Move() function is called)
- The rope is simulated.
- Rigidbodies are simulated.
(16-05-2018, 04:05 PM)VirtualCucumber Wrote: And I would assign that function to the event like this?
Code:private void Start()
{
solver.OnStepBegin += Move;
}
Yes, but make sure the function parameters match the delegate parameters.