18-04-2022, 09:38 AM
(This post was last modified: 18-04-2022, 09:39 AM by josemendez.)
(17-04-2022, 06:22 PM)Natty Wrote: I am having a hard time keeping the red part of the bobber, floating at the top though, as it seems to get pulled down by the rope? Not sure how to fix this, but here is the buoyancy script so far: https://hastepaste.com/view/LuX8
The mass of the rope vs the mass of the bobber will control how they relate to each other, just like in the real world: if the rope mass is high compared to the bobber, it will move/rotate it around easily. Conversely, if the bobber has more mass than the rope, it will move the rope around. (Note you can set the rope's mass on a per-control point basis using the path editor)
You might also want to change the bobber's center of mass (CoM) position. Usually they have a pretty low CoM, if you leave it at its center -which is the default for a sphere- it will easily spin around. See: https://docs.unity3d.com/ScriptReference...fMass.html
kind regards,