Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Raycasting rope behind an object
#3
(05-03-2024, 10:15 AM)josemendez Wrote: Hi,

Obi and Unity's built-in physics are completely separate engines. This means raycasting in Obi only considers Obi particles and will ignore colliders (since they're not simulated by Obi, but by Unity's own physics engine).

The solution to your problem is to perform two raycasts: a regular Unity raycast to determine whether it hits a collider along the way, and it case it doesn't hit anything, a Obi raycast to determine which particle it hits (if any).

This is also more performant that a single raycast considering both colliders and particles would be, since it allows you to skip particles in case you hit a collider first.

kind regards

Thanx!

I'll do it this way
Reply


Messages In This Thread
Raycasting rope behind an object - by Apoll0 - 05-03-2024, 10:06 AM
RE: Raycasting rope behind an object - by Apoll0 - 05-03-2024, 11:14 AM