|
Hey guys, first off thanks for looking. I'm pretty new to Unity3D and Javascript but I'll explain what I'm trying to do and hopefully someoen can point me in the right direction. I've tried googling and searching answer and I've not found anything that quite helps me but I'll keep looking in the mean time. Basically I'm making a simple maze which shows different types of interaction for an assignment. I've got cubes which basically fall from the sky and hit the ground and do a camera shake when they do so with the help of iTween. At the moment they do this as soon as it loads up so I thought a trigger would be a good idea so when the player gets to a certain part in the maze the columns would start doing their thing then. The script I have so far is :
I have a trigger ready called columnTrigger, this script is currently attached to the cubes so how do I get this script to see if the player has collided with it? Do I need a second script to tell this one when the player has hit it? Or can I use this script to do this job? It's probably a very basic thing to do but as I said I'm pretty new with this and I'm still trying to grasp this software. Thanks again for looking. Lev
(comments are locked)
|
|
You don't need a second script. The trigger object will detect the collision just fine: Will this work even if the trigger isn't the object? I've made a cube, unticked the material and ticked isTrigger and put it before the corridor where the cube is. Basically I've made a maze and because these cubes make the screen shake I want them to start only when I'm nearer to them so the screen isn't shaking all the time while you're navigating the maze. So basically the object with this script is round the corner with another object that is a trigger is in a different place. Thanks for the quick reply.
Mar 12 '11 at 12:45 AM
Leverage
(comments are locked)
|

Sorry, I would help... But I don't know iTween...
-Good Luck
The iTween only makes the object move, I just need to get it to do that only when the "Player" has walked through a trigger that is not this object.