I have a target object - literally a target with three hit zones - about 20% of the target is the bull's eye zone, outward another 50 to 70 % is the great hit zone and the rest, towards the rim of the target is the hit zone with the lowest score. My problem is that I cannot properly define in script the correct distance; I am using raycast for this.
var _hitDistance:int =
Mathf.Round(
Vector2.Distance(
_thisTransform.position,
hit.collider.transform.position)
* 100);
if ( _hitDistance <= BullsEyeHitDistance ) //bullseye hit
↧