Detect raytrace source?

Hey, peeps.
I’m currently implementing an indicator to show which direction players are taking damage from. I’ve recently swapped from physics based projectiles to hit scanning.

So to make this indicator, I need the position of the enemy that’s causing damage… but I don’t know how to identify which enemy that’s causing damage.

Does anyhone know how to do this?

Thanks

1 Answer

1

Try to pass on you get damamge the direction of the raycast, or make a Vector3 with the position and passed it on the getDamageFunction