12-04-2019, 07:10 AM
(This post was last modified: 12-04-2019, 07:11 AM by josemendez.)
(12-04-2019, 04:36 AM)VirtualCucumber Wrote: My problem is a bit unique but ill break it down with gifs/pics.
Physics movement w/ Rigidbody + Obi Solver updating "After Fixed Update":
Same thing but solver being updated at FixedUpdate:
Theres a clear delay in positioning and its obvious it deals with the physics orders these both are executing at but this is where my problem gets unique.
I want to attach a Transform to the ends of each of the arms and they would act like hands for interacting with items like so:
That was an old iteration of the project and its moving the transform.position of the balloon for movement, not rigidbody physics.
This is it with the solver updating on FixedUpdate (works like intended BUT would have physics position delay between the rope and balloon):
This is what happens when i attach hands when solver is not updating in FixedUpdate (This would give desired balloon movement [no delay with the rope] but my hands method wont work):
I get this effect by adding a pin constraint from end particle of LeftArm to the LeftHand object that has a collider/rigidbody/obi collider/obi rigidbody and the mass is pretty low. Its main purpose is just to let me control the end of the arm when the player goes to interact with something.
So im in this situation where this project needs physics movement to match the theme (with rigidbody) but cant do that if i want to create hand objects.
Is there another way of doing this or maybe a work around because my end goal is to control the end of the arm ropes to interact with objects but cant have that delay between rope and balloon while moving.
Hi,
Delays are generally caused by updating things in the wrong order, for instance if your script changes the rigidbody position after simulation has taken place for that frame, there will be a 1-frame delay between the rope and your object.
Why not setting particle positions/velocities directly to control the hands? See:
http://obi.virtualmethodstudio.com/tutor...icles.html