I don’t have any code yet. Really just looking for some gentle nudging in the right direction. My initial inclination is to iterate through 360 ray casts each separated by a degree (and that only works for circular and not spherical collision) but I was hoping there was a better way to do this. Is spherecast the appropriate method? Any thoughts would be much appreciated.
If the player is in the blast radius then use
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Player")
{
ShootRayAtPlayer(); //Have this function set up to shoot a raycast in the direction of the player
}
}
This way if there is something between the bomb and the play the raycast wont reach the player and if there is nothing between them just use hit.transform.SendMessage() to apply any damage.
Hope this was helpful.