x


Activating animation by a moving trigger

Hi everybody, I am pretty new to unity and its scripting language. I have a problem with colliders and triggers that concerns activating an animation for a game object or doing anything for a start. To my main camera there is a box collider attached that is placed in the middle of my field of view. This collider is defined as a trigger and schould activate an animation on other collider's object (also a box). Right now it doesn't do anything. Not even OnTriggerEnter() is called. The box has a rigid body component as well. Is there somebody who could help me with this?

The whole idea behind the script is to activate certain events with my field of view. If somebody has a different idea to share with me, please do so!

Thank you! J

Response: I have finally found a solution! The problem was that the camera has to be a rigid body and the trigger should be on the box, where the OnTriggerEnter is called. Then it works fine.

more ▼

asked Oct 13 '11 at 06:26 AM

koja87 gravatar image

koja87
1 1 2 3

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

0 answers: sort voted first
Be the first one to answer this question
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:

x3807
x1707
x986
x337

asked: Oct 13 '11 at 06:26 AM

Seen: 821 times

Last Updated: Oct 13 '11 at 06:26 AM