RayCast #172
Answered
by
ViachaslauBusel
ViachaslauBusel
asked this question in
Q&A
RayCast
#172
-
Hello, I cannot get the collisions of the ray with objects. What am I doing wrong?
HitHandler``` public unsafe struct HitHandler : IRayHitHandler { public Buffer Hits; public int* IntersectionCount; [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool AllowTest(CollidableReference collidable) { return true; }
|
Beta Was this translation helpful? Give feedback.
Answered by
ViachaslauBusel
Nov 2, 2021
Replies: 1 comment 1 reply
-
As I understand it, the IRayHitHandler.OnRayHit method is called every time the ray hit with an object. And in the example of the OnRayHit method I took, several rays were transmitted and the one ray with the nearest hit point was sampled. and I didn't set the initial parameter "T = float.MaxValue;" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ViachaslauBusel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I understand it, the IRayHitHandler.OnRayHit method is called every time the ray hit with an object. And in the example of the OnRayHit method I took, several rays were transmitted and the one ray with the nearest hit point was sampled. and I didn't set the initial parameter "T = float.MaxValue;"