x


Collision Query

Hi folks, I've got a basic understanding of collisions, but what I want to know is this:

Can I make an object pass through another, but still have OnCollisionEnter called?

more ▼

asked Jul 15, 2010 at 11:27 AM

Peange gravatar image

Peange
38 7 5 11

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

1 answer: sort voted first

hi,

it sounds like what you want are trigger events. You need to set your Collider to 'isTrigger = true' (either via the check box in the collider component or via scripting).

Then they won't actually call Collision events, but rather 'trigger' events when another object passes through them. (eg OnTriggerEnter, OnTriggerExit and OnTriggerStay)

more ▼

answered Jul 15, 2010 at 11:47 AM

andrew gravatar image

andrew
609 29 26 35

That's brilliant thanks, worked a treat

Jul 15, 2010 at 11:48 AM Peange
(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:

x4370
x3282
x362

asked: Jul 15, 2010 at 11:27 AM

Seen: 1324 times

Last Updated: Jul 15, 2010 at 11:27 AM