Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Generate a weight sustaining cable through code
#1
Hello, 

We are trying to build a bridge building game, similar to polybridge, in which the players bridge will be suspended through the use of ObiRopes. See an example below: 

https://youtu.be/TnOuC95eGAM

Players select two node points (yellow nodes in the video), and a rope is instantiated between these two points. As you can see, the rope is reacting well (vibration and stiffness) to the bridge road tiles breaking. But the rope doesn't really pull the road tiles upward. 

For reference: Mass of Road unit = 10, Yellow nodes mass = 20, Truck mass = 300. The particle attachment is set to dynamic, with a compliance of 0 and break threshold of infinity. Each rope has 2 control points. Each control point mass is set to 10f at the moment. 

How do we go about making a more realistic suspension effect?
Reply
#2
Make sure you're using dynamic attachments to attach the rope to the road tiles. Otherwise the tiles will just ignore the rope. See:
http://obi.virtualmethodstudio.com/manua...ments.html

Also, keep your mass ratios within sane values. All realtime physics engines find it hard to deal with large mass ratios (>1:10) both Unity and Obi are no exception to this. If your truck is 300 kg and your rope is 10 kg, you have a ratio of 1:30, and the weight of the truck will stretch the rope.

Using more simulation substeps (ObiFixedUpdater component) will help as it increases simulation quality, but the resulting simulation will also be more expensive.
Reply