Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make the Start/End Prefab able to be Raycasted?
#2
(30-10-2017, 09:32 AM)Rexima Wrote: I want to be able to grab my Rope on the End or Start, and i thought to raycast the end/start of it, so the player can grab it.
How can this be done?

Hi there,

Raycasting is the wrong approach (in fact, what do you want to raycast exactly? there are no colliders in a rope, and you cannot trivially raycast against a deformable mesh).

You should use handles, and a proximity test to see if your grappling point (e.g. player hand) is near the rope end/start. If it is, then create a handle. Alternatively you can just fix the first/last particles in the rope and directly set their position to whatever you need them to be. See:
http://obi.virtualmethodstudio.com/tutor...ments.html
http://obi.virtualmethodstudio.com/tutor...icles.html

Edit: If you're doing this for VR, there are a few threads on the subject:
http://obi.virtualmethodstudio.com/forum...ight=niZmo
http://obi.virtualmethodstudio.com/forum...ight=niZmo
Reply


Messages In This Thread
RE: How to make the Start/End Prefab able to be Raycasted? - by josemendez - 30-10-2017, 11:13 AM