Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Grab the middle of a rope?
#8
(12-09-2017, 04:31 AM)niZmo Wrote: Hey, no problem. I've been creating a new interaction system with these two frameworks, and hopefully it covers most of what people want to do with ropes and cloths in VR. It'll be posted on the Made With Obi forum once I finish.

Thank you for putting up this script. I've tried it with with Obi Rope 3.4 and VRTK 3.3.0a  (Unity 5.6.3p2) but saw some compiler errors.

Error CS1061 'ObiList<Oni.Contact>' does not contain a definition for 'Length' and no extension method 'Length' accepting a first argument of type 'ObiList<Oni.Contact>' could be found (are you missing a using directive or an assembly reference?) VRTK_ObiRopeSolver.cs 250 Active

Error CS0021 Cannot apply indexing with [] to an expression of type 'IEnumerable<ObiConstraintBatch>' VRTK_ObiRopeInteraction.cs 37 Active

Error CS0021 Cannot apply indexing with [] to an expression of type 'IEnumerable<ObiConstraintBatch>' VRTK_ObiRopeInteraction.cs 54 Active


Do you know if the underlying Obi structures changed after Obi3.2? 

I changed e.contacts.Length to e.contacts.Count and pinConstraints.GetBatches()[0] to pinConstraints.GetBatches().ElementAt(0) which compiled after I added using System.Linq;

I have both the rope and solver on the same object so I attached both VRTK_ObiRopeInteraction.cs and VRTK_ObiRopeInteraction.cs to it, and set the Grabbing Enabled under both left and right controller info. Nothing seems to happen when I try to grab the rope though. I tried to add the usual VRTK interaction components (from the "Setup Interactable Object" wizard) to the rope but that didn't seem to do anything either.

Am I missing something? Thanks.
Reply


Messages In This Thread
Grab the middle of a rope? - by BlueTel - 24-08-2017, 04:16 PM
RE: Grab the middle of a rope? - by josemendez - 24-08-2017, 05:47 PM
RE: Grab the middle of a rope? - by niZmo - 02-09-2017, 07:56 PM
RE: Grab the middle of a rope? - by Parker - 12-09-2017, 04:12 AM
RE: Grab the middle of a rope? - by niZmo - 12-09-2017, 04:31 AM
RE: Grab the middle of a rope? - by Parker - 12-09-2017, 02:01 PM
RE: Grab the middle of a rope? - by darkcser - 28-04-2018, 10:24 PM
RE: Grab the middle of a rope? - by niZmo - 30-04-2018, 06:42 PM
RE: Grab the middle of a rope? - by BlueTel - 08-09-2017, 04:20 PM
RE: Grab the middle of a rope? - by niZmo - 01-05-2018, 06:08 AM
RE: Grab the middle of a rope? - by darkcser - 02-05-2018, 05:19 AM
RE: Grab the middle of a rope? - by niZmo - 03-05-2018, 12:54 AM
RE: Grab the middle of a rope? - by darkcser - 04-05-2018, 04:13 PM
RE: Grab the middle of a rope? - by darkcser - 05-05-2018, 07:42 PM