Skip to main content
New Participant
October 18, 2022

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.

This topic has been closed for replies.

1 reply

Participant
November 23, 2022

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?