Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Grab the middle of a rope?
#11
(01-05-2018, 06:08 AM)niZmo Wrote: Alright I changed some things up, and you were on the right track. Instead of using Linq, Obi has a new method for the constraints called GetFirstBatch(), but the real problem was the colliders hit registration.

Here is the updated code for ObiRope 3.4 and VRTK 3.3.0 alpha. I have also attached the files which is probably easier lol.
This has minimal functionality, a lot of things can be done like attaching 2 particles on grab so the rope doesn't rotate while grabbing with one hand.

Add this to the same gameobject as ObiSolver:

Add this to the same gameobject as your ObiActor:

Wow, thanks for the quick update!

The new code compiled fine but I still could not grab the rope that I created. I also tried it with the chain from the Chain scene in the Obi examples folder.

I used 004_CameraRig_BasicTeleport scene from VRTK as a base, added VRTK_InteractTouch and VRTK_InteractGrab to the controllers, and created a cube set with Windows->VRTK->Setup Interactable Object. Was able to pick up the cube fine with the grip button. I then created a Obi Rope (Fully set up), and added VRTK_ObiInteractableActor and VRTK_ObiInteractableSolver to it. 

In the debugger I can see HandleGrabButtonPressed being triggered but isTouchingParticle seems to always be false. I put a break on HandleSolverCollision but it looks like the contact.distance threshold is never hit. I tried to bump up the collider size in VRTK_ObiInteractableSolver to 0.1 but that didn't help. I noticed that the VRTK_ObiInteractableActor was using ObiPinConstraints so I created some but was not sure what to pin them to.

Am I missing some other step?
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