Raycast: getting the hit entry
Posted: Fri Jun 03, 2011 3:47 pm
Hi there!
I just started playing around with bepu and I already have a little problem:-/ I used the Space.RayCast method to cast a "laser" ray. That works pretty well, but I have difficulties to determine which object has been hit. Of course there is the HitObject in the RayCastResult, but I was not able to get the entity of hit object(tried it with casting, but that didn't work). For example I've created a simple Box. How can that box get notified if it gets hit by the raycast?
Thx!!!
I just started playing around with bepu and I already have a little problem:-/ I used the Space.RayCast method to cast a "laser" ray. That works pretty well, but I have difficulties to determine which object has been hit. Of course there is the HitObject in the RayCastResult, but I was not able to get the entity of hit object(tried it with casting, but that didn't work). For example I've created a simple Box. How can that box get notified if it gets hit by the raycast?
Thx!!!