|
I'm trying to make animations that react to the player's mouse. I looked all over the unity reference site and nothing works. What am I missing?
(comments are locked)
|
|
First thing to check is wether the functions are called at all, e.g. using If they are not:
(comments are locked)
|
|
All 3D interaction between gameobjects and the mouse needs be done through COLLIDERS. Colliders are responsible of intercepting events between gameobjects and the world, basically. 1 add a collider of any type to your gameobject 2 add the following code in a c# script that you attach to the gameobject 3 in play mode click over the gameobject
(comments are locked)
|

Are the functions called at all (check with some
Debug.Log()). If not, do you have a collider on those objects? Are they on the "ignore raycast" layer?so I must put script that effects animation on an object that has a collider and animation component?
Yes, your script has to be on a gameobject with a collider.