Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RayCast Hit to Obi Rope
#1
I want to click on my rope, from any length or side, by using RayCast.

Can I not use RayCast to interact with my rope? 
Reply
#2
(22-03-2021, 10:35 PM)Rexxedy Wrote: I want to click on my rope, from any length or side, by using RayCast.

Can I not use RayCast to interact with my rope? 

Raycasts only work with Unity colliders. Obi is a particle-based engine, so you can’t use Unity’s raycast methods with it.

You can use the ObiParticleDragger / ObiParticlePicker components, they do exactly what you want. The picker raycasts against particles (using a simple point-ray distance test) and calls click/drag/release events. The dragger subscribes to those events and implementd particle dragging.

Kind regards
Reply