I want my ray casting method to return something like "Hit target" or "Hit wall", as right now it just says "Hit" or "Miss" depending on whether the ray has hit a target. How can I differentiate between my rigid bodies in the scene, to know which I am currently hitting?
Right now, I'm just doing this (without the walls having collision shapes):
Code: Select all
if (RayCallback.hasHit()) {
printf("Hit!");
}
else {
printf("Miss!");
}