RayCast Hit to Obi Rope - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: RayCast Hit to Obi Rope (/thread-2823.html) |
RayCast Hit to Obi Rope - Rexxedy - 22-03-2021 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? RE: RayCast Hit to Obi Rope - josemendez - 23-03-2021 (22-03-2021, 10:35 PM)Rexxedy Wrote: I want to click on my rope, from any length or side, by using RayCast. 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 |