It looks like you're new here. If you want to get involved, click one of these buttons!
Hi recently I made a grappling game where player had to grapple on to cubes and complete the level. There i used raycasting but now I'm able to raycast into air and grapple into air any ideas how to fix it Please Help
JIMMY_VASHI04
Member
You can check if the ray hit the certain tagged object like
RaycastHit hit;
If(Physics.Raycast(origin,direction,out hit,max distance)){
If(hit.tag == "cube"){
//grapple
}
}