Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
joaoinklusion2022's avatar
joaoinklusion2022
Honored Guest
4 years ago

Interaction SDK - ColliderSurface

I am trying to expand the poke interactions sample to include an example using the ColliderSurface class, which is included in the SDK.

 

However, it is failing constantly, as the direction of the generated Ray is always 0, which means that the closest point is equal to the point itself.

 

public bool ClosestSurfacePoint(in Vector3 point, out SurfaceHit hit, float maxDistance = 0)
{
Vector3 closest = _collider.ClosestPoint(point);
return Raycast(new Ray(point, closest - point), out hit, maxDistance);
}

 Is it necessary to use a different setup to use a ColliderSurface? The document does not mention it.

1 Reply

Replies have been turned off for this discussion
  • Hey joaoinklusion2022,

    I'm having the same issue trying to have box with poke interactable and a collider surface. Were you able to fix the issue?