- Home /
Not able to use a Vector as a condition in Mecanim?
In Mecanim, when I go to a state's transition to attempt to add a Vector parameter as a condition, it isn't shown in the dropdown list. Bools/ints/floats show up fine, but Vectors don't show up at all. I can't think of a reason why they wouldn't be there. Is this a bug, intentional or am I doing something wrong?
Thanks.
Answer by alexpizzini · Jun 06, 2013 at 08:46 PM
If you can't use vectors, you could setup three properties that get and set the x, y, and z components of a vector.
private Vector3 myVector;
public float myVectorX {
get {
return myVector.x;
}
set {
myVector = new Vector3(value, myVector.y, myVector.z);
}
}
Your answer
Follow this Question
Related Questions
How to generate Mecanim Sub-state namehash? 6 Answers
AnimatorTransitionInfo.IsName() Not Working 1 Answer
How to stop mesh disappearing during Animator state transition blend time? 1 Answer
How to get fileID information so i can just edit Mecanim Animator through script? 2 Answers
What are those white curves in the animation transition panel - And can I read it in script? 0 Answers