Obi Official Forum

Full Version: RayCast Hit to Obi Rope
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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? 
(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