I'm trying to get some raycast and/or collision detection working.
If my enemy gets hit by a car on his left side, an animation will play of him tumbling away to the right. I'm not using physics for the collision, the animation for each direction is already finished.
I'm hoping to develope this enemy script to detect both raycast hits (machine gun) and collider hits (rocket, car, etc) and will share the end results.
The script needs to to figure the angle of hit on the controller and fire the script.
I'm thinking something along lines of:
if(hit.angle>180)
animation.Play("tumbleLeft");
if(hit.angle<180)
animation.Play(“tumbleRight”);
Seems the class "ControllerColliderHit" would get me started but still having trouble getting it together.