x


Limit Contact Points?

Is there some kind of way that I can limit the number of contact points collision will register? When swinging a weapon it usually registers anywhere from 2-4 contacts, which is definitely not the effect I want.

more ▼

asked Sep 02 '11 at 01:47 AM

TheEmeralDreamer gravatar image

TheEmeralDreamer
171 47 64 70

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

So just ignore the other contact points and only look at the first in the array.

more ▼

answered Sep 02 '11 at 02:03 AM

Waz gravatar image

Waz
6.4k 22 33 70

Explanation plox!

Sep 02 '11 at 02:17 AM TheEmeralDreamer

You see multiple contact points in the Collision.contacts array when you get OnCollisionEnter. Only look at collision.contacts[0].

Sep 02 '11 at 02:20 AM Waz

I see. I'm using an OnTriggerEnter function so does that still apply?

Sep 02 '11 at 02:26 AM TheEmeralDreamer

OnTriggerEnter doesn't report contact points. Do you actually just mean you get the OnTrigerEnter multiple times... once for each Collider composing the weapon?

Sep 02 '11 at 02:34 AM Waz

Well this is what occurs. I swing a Weapon into a model and it registers a function that is called when the weapon(a trigger) enters the model. This function is called multiple times, leading me to think that either the trigger enters the model multiple times, hence multiple contact points.

How does OnTriggerEnter handle it?

Sep 02 '11 at 02:38 AM TheEmeralDreamer
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2482
x12

asked: Sep 02 '11 at 01:47 AM

Seen: 855 times

Last Updated: Sep 05 '11 at 11:11 PM