x


Triggers not getting detected properly

I have 2 triggers and a platform moving between them. the script is working for the most part except for one odd error. the platform wont detect the triggers unless it touches them from above. the platform moves up by default and when touching the trigger above it should go down however it just keeps going up. if i force it to go down and it touches the trigger it just passed it changes back to moving up as i told it to. anyone know why the triggers only get detected from below?

more ▼

asked Apr 03, 2011 at 04:14 PM

user-11088 (google) gravatar image

user-11088 (google)
1 3 2 2

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

1 answer: sort voted first

On the assumption that you are using Mesh Colliders for your triggers, you will have to make them Convex in the inspector for them to pick up collisions from the front and back.

more ▼

answered Apr 03, 2011 at 04:21 PM

KeithK gravatar image

KeithK
907 6 5 19

yes i am using mesh colliders. and how do i make them convex?

Apr 03, 2011 at 04:36 PM user-11088 (google)

Select your triggers in the Unity Editor. In the Inspector window under the component "Mesh Collider", check the box next to "Convex".

Apr 03, 2011 at 04:46 PM KeithK

ok i figured out the convex part but it didnt fix it. it still doesnt detect if it hits the triggers from below

Apr 03, 2011 at 06:33 PM user-11088 (google)

Your platform, is it also using a Mesh Collider? Have you tried setting it to Convex as well?

Apr 03, 2011 at 07:00 PM KeithK

the platform had a box collider but i tried with a convex mesh but still nothing

Apr 05, 2011 at 08:41 AM user-11088 (google)
(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:

x9075
x6174
x3143

asked: Apr 03, 2011 at 04:14 PM

Seen: 1266 times

Last Updated: Apr 03, 2011 at 04:14 PM