- Home /
overlap half sphere?
Hello,
I have player that has 3 attacks. The first is based on the selected target (done). The third is an AOE (overlapsphere - done). The middle one is the one I am having trouble with, Its basically a "Swipe" that should hit anything in front of the target (180 degrees give or take) but only a certain distance from the target.
I am having the damndest time with this. Is there a way to "tighten" an overlap sphere to only grab things in a specific angle? I have a feeling I am way over-thinking this but everything I have tried has failed me.
Halp?
You will still want to use your AoE collector, then filter potentials based on the Swipe so you are close. There's Vector3.Dot, Vector3.Angle or maybe Transform.InverseTransformPoint (I saw a post from Eric on this but now can't find it)