Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scripting ropes with pin constraints & tethers
#3
Hi Jose – 

Based on your suggestions, I've been attempting to fix all the problems I'm having, but nothing seemed to be helping. So I started to suspect that there was something more going on, and I thought it might be useful to build a test scene with a simple comparison between an normal ObiRope and the one I'm trying to script. 

For some reason, this forum won't let me attach either a Unity package or a zip file ("The type of file that you attached is not allowed" – is there some sort of trick?) so I've put it up on Dropbox (the package and the zipped package just in case – both are the same) – here's the link:

https://www.dropbox.com/sh/00ax1phu767el...CLb2a?dl=0

The package includes the scene (ropeComparison3), my script (ObiRopeScriptTest.cs), a prefab (Breeze) with an ObiAmbientForceZone and a simple script (Rotator.cs) to move the ropes around a bit.

As you'll see when you run the scene, the rope that I'm creating through my script is behaving nothing like one that that was built in the Unity editor. 

There are two ropes: the one to the left is the normal one, and the one to the right is the one I'm scripting. Each is pinned to an kinematic rigidbody at the top and a second rigidbody at the bottom. There are two solvers, one for each rope. 

The scripted rope has a much longer resting state than the normal rope. Why?

The normal rope has a Resolution of 0.25, which generates six particles. If I set the resolution of my scripted rope to 0.25, I get about 24 particles. To generate six particles, I had to lower the Resolution to 0.06. Why?

The scripted rope is much more jumpy when it's initialized. Why?

Each rope has its own solver. If I assign the same solver to both ropes, the scripted rope fails. Why?

Thanks again for all your help!

- pH
Reply


Messages In This Thread
RE: scripting ropes with pin constraints & tethers - by phoberman - 29-12-2017, 07:20 PM