- Home /
colliders with touch
i have an animated model which has two colliders in the model. One on the left one on the right. The problem is how to identify which collider is being touched and how to activate a method accordingly...Can u please help me? i m new to unity scripting so
I have looked into Tags but the OnTriggerEnter() doesn't get activated nor am i able to find by tag. Is it for this method to activate there has to be another object to collide with this model ins$$anonymous$$d of a touch??
I don't really get your definition of 'Touch', but yeah, for OnTriggerEnter and it's sorts to work, there have to be two colliders colliding with each other. In case of an OnTriggerEnter you have to make your (box?)collider a trigger. In case of OnCollisionEnter, just leave that as it is. For these functions to work on of the two colliding objects has to have a Rigidbody. Otherwise Unity will not see it as a collision. Hope this helps.
thank u ....my definition of Touch is swipe across the screen .. thank u for your help
Your answer
Follow this Question
Related Questions
Create Circular Motion to follow the object 2 Answers
Show activity indicator in center of screen 0 Answers
ASDAsdASDasdqweqw3edqwdQWDEqwedQWD 3 Answers
whole animation not being played 0 Answers
turn on off particle system 1 Answer