Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
09-02-2021, 09:33 PM
(This post was last modified: 09-02-2021, 09:34 PM by josemendez.)
(09-02-2021, 05:17 PM)Xanduffy Wrote: Hey sorry for the delayed response, I had some unrelated technical difficulties that stopped me trying out your suggestion yesterday. I've made those exact changes and frustratingly it is still not working, with little change if any. No collisions are being registered between my hands and the rope, meanwhile if there's a collision between my hands and the grappling hook while I press the grab button the Debug line shows the following result.
Code: var contactCollider = world.colliderHandles[contact.other].owner;
ObiSolver.ParticleInActor pa = solver.particleToActor[contact.particle];
Debug.Log(pa + " hit " + contactCollider);
I'm at a loss, particularly as to why the hands are not triggering the initial debug message despite visibly pushing the rope around while pressing grab. I have no idea why this is working for you but not even registering those baseline collisions for me. If you'd like I can record video of the issue?
I considered attempting to instantiate new gameobjects when the player grabs the rope and pin the rope to those rather than the hands directly, in case there was an issue with the hand tracking script overriding the pin constraint(I may be off base with that), but this isn't possible either while no collisions are being registered with the rope.
I appreciate all this help.
Works fine for me after the above changes, I will record a detailed video tomorrow for you.
Posts: 25
Threads: 3
Joined: Jan 2021
Reputation:
2
09-02-2021, 11:10 PM
(This post was last modified: 09-02-2021, 11:11 PM by Xanduffy.)
(09-02-2021, 09:33 PM)josemendez Wrote: You have an inspector open in debug mode. Unity won't draw any scene view windows (such as the path editor's small UI box) then. Either hunt for the inspector in your tabs and take it out of debug mode, or reset the window layout to the default (the latter tends to be quicker). From the FAQ:
http://obi.virtualmethodstudio.com/faq.html
Foolish mistake, thanks. I await your video, appreciate it!
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
Hi! here's the video:
I don't think it covers anything I didn't previously mention, but maybe you can spot any difference between what you have vs what I do. Let me know how it goes.
Posts: 25
Threads: 3
Joined: Jan 2021
Reputation:
2
(10-02-2021, 12:41 PM)josemendez Wrote: Hi! here's the video:
I don't think it covers anything I didn't previously mention, but maybe you can spot any difference between what you have vs what I do. Let me know how it goes.
Thanks a million Jose! Watching the video I realised that absolutely the only difference between our setups was the form of input, so I overhauled the input system and put together a script to read button inputs more directly and it worked! Gonna try do a bit more digging to find out why, all I can say for now is that invoking the Grab and Release methods in the XR Interactor inspector does not work, maybe that will help someone else if they come across this thread.
I still have a number of issues to resolve as the rope does not respond well to the hands rotating while holding it, and the attachment point ends up quite far from the hand colliders for some reason, but it's such a relief to have the basic grab working, thank you very much for the help.
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-02-2021, 09:33 AM
(This post was last modified: 11-02-2021, 09:35 AM by josemendez.)
(10-02-2021, 06:29 PM)Xanduffy Wrote: Thanks a million Jose! Watching the video I realised that absolutely the only difference between our setups was the form of input, so I overhauled the input system and put together a script to read button inputs more directly and it worked! Gonna try do a bit more digging to find out why, all I can say for now is that invoking the Grab and Release methods in the XR Interactor inspector does not work, maybe that will help someone else if they come across this thread.
I still have a number of issues to resolve as the rope does not respond well to the hands rotating while holding it, and the attachment point ends up quite far from the hand colliders for some reason, but it's such a relief to have the basic grab working, thank you very much for the help.
I don't have that much experience with VR (mostly Oculus Quest/Rift using their own SDK, never used Unity's XR stuff) but according to the documentation interactors only are able to interact with interactable colliders. So they will only fire events when in contact with an interactable:
https://docs.unity3d.com/Packages/com.un...index.html
I might be wrong, but at a first glance this seems like a plausible explanation for why the collision events were only working when the hand was in contact with the hook.
cheers!
Posts: 20
Threads: 6
Joined: Feb 2021
Reputation:
0
I used the code that you added previously , but I am getting 2 errors for:
-contact.other
-contact.particles
Oni contact does not contain definition etc.
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-02-2021, 02:02 PM
(This post was last modified: 16-02-2021, 02:03 PM by josemendez.)
(16-02-2021, 01:57 PM)tpaslou Wrote: I used the code that you added previously , but I am getting 2 errors for:
-contact.other
-contact.particles
Oni contact does not contain definition etc.
If you're using Obi 6.0, these have been renamed to contact.bodyB and contact.bodyA, as stated in the changelog.
Posts: 20
Threads: 6
Joined: Feb 2021
Reputation:
0
(16-02-2021, 02:02 PM)josemendez Wrote: If you're using Obi 6.0, these have been renamed to contact.bodyB and contact.bodyA, as stated in the changelog.
Ah , Thank you.
Is there any chance you upload a demo for VR to a repository? or maybe a scene in the obi rope package. This is extremely useful for people working in VR and want to grab cables, chains or ropes (like me).
Posts: 25
Threads: 3
Joined: Jan 2021
Reputation:
2
(16-02-2021, 02:36 PM)tpaslou Wrote: Ah , Thank you.
Is there any chance you upload a demo for VR to a repository? or maybe a scene in the obi rope package. This is extremely useful for people working in VR and want to grab cables, chains or ropes (like me).
I'll gladly pay forward the help I got from Jose and upload a basic demo scene later this week! (Bit busy at the moment)
Posts: 1
Threads: 0
Joined: Feb 2021
Reputation:
0
18-02-2021, 03:40 AM
(This post was last modified: 18-02-2021, 03:41 AM by polymod.)
ive been plugging and playing what seem like all sorts of different solutions to accomplishing this, this thread feels like its gotten me the closest but i ultimately want to "pick up" objects with this rope, grappling hook-esque. That would of course require a rigid body on the objects, but this Grab event script doesnt seem to work if the object has a rigidbody, no collision detected.
I thought i was really on track with a much simpler approach. On Collider Enter, populate particle attachments "end" constraint target with collided object. But i couldnt figure out the line to "set" that target.
I guess suffice to say, i see so many approaches that almost get me there, this seeming the most promising if we can get it to "Grab" onto a rigidbody. Or, tell me if one of the other scene examples would be a better starting point to accomplish this? Fairly novice at C#, using this project to pile on the learning, thanks!!
my current state:
https://vimeo.com/513660042
|