0 votes
asked in General Help by (120 points)
Can i setup hit reaction on standart physic impulse in radius?

1 Answer

0 votes
answered by (22.8k points)

Hey,

You could try this:

if (Vector3.SqrMagnitude(explosionPoint - hitReaction.transform.position) < explosionSqrRadius) {

                foreach (HitReaction.HitPointEffector e in hitReaction.effectorHitPoints)

                {

                    Vector3 force = e.collider.transform.position - explosionPoint;

                    float mag = force.sqrMagnitude / explosionSqrRadius;

                    hitReaction.Hit(e.collider, force * mag * explosionHitMag, explosionPoint);

                }

            }

Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.

...