- Home /
Detect trigger touching another trigger?
Hi, I'm trying to make a prototype for a physics mech building game, to do this the player spawns physics pieces and can move them around with thier physics turned of (I set the Rigidbodies to isKinematic = true) the player would then be able to join up pieces and hit "simulate" to turn on physics for the whole mech all at once
So to be able to weld pieces together i need to detect if they are touching, but i don't know how
the functions OnTiggerStay, OnCollisionEnter etc. all require colliders that are "solid", they can't be triggers or have isKinematic = true
Is there a way I can detect these triggers colliding other triggers?
Any help would be much appreciated
PS: here's a playable link of my progress so far : https://dl.dropbox.com/u/1542202/MechBuilder01/WebPlayer/WebPlayer.html
Answer by Berenger · Jun 23, 2012 at 03:53 PM
You can receive a message with a kinematic rigidbody only if the other collider has a non-kinematic rigidbody. You can then add a rigidbody to each part, set useGravity false, freeze all movement / rotation and set kinematic only the one you move.
Btw, you should disable the picking when the player is dragging the mouse, and the rotations axis are a bit hard to select. Also, you could improve your outline shader by drawing them before the object, that would remove the outlines inside it. Sort of like that shader. But that's a matter of taste I guess.
Your answer
Follow this Question
Related Questions
Can not get OnTriggerEnter and OnCollisionEnter to work!? 1 Answer
OnTriggerEnter doesnt see enemy 1 Answer
Updating a Value in OnTriggerEnter and Returning That Value Immediately... 0 Answers
Child Object's collider setting off triggers 1 Answer
How do I prevent multiple triggers using OnTriggerEnter? 1 Answer