In our previous QUICK-TIP (Configure SALSA With Fewer BlendShapes), we showed you how to use fewer blendshapes on your model with the SALSA component. In this article, we'll show you how you can use a similar technique to restrict the awesome eye movement in RandomEyes to certain quadrants, while maintaining some random movement. We'll be demonstrating this using RandomEyes3D; although the principals are the same for RandomEyes2D.
RandomEyes gives you the ability to programmatically set specific eye directions; however, this does require that you turn off random eye movement by unchecking the Random Eyes property in the Inspector or programmatically via the public function RandomEyes3D.SetRandomEyes(boolean):
NOTE: disabling the RandomEyes option in the Inspector hides the properties associated with this function.
Now, let's assume you'd like to keep the natural random movement, but focus your look direction down to half or even one quarter of the available movement area. For this tutorial, the examples assume your index numbers for LookUp - LookRight are the default positions (indexe numbers 4 - 7 respectively) as described in the manual:
To limit your character's random movement affinity, you can restrict it to the view halves, such as: upper half, lower half, right half, or left half. You can also limit to some quarter views, such as: upper right, upper left, lower right, or lower left.
Halves:
Upper Half: Prevent the LookDown index from being used by RandomEyes by setting the LookDown Index property to be the same as the LookUp Index, for example:
Restraining to the Lower Half would be the same principle (LookUp & LookDown) set to index number 5, which is the LookDown index. This prevents the LookUp index from being used by RandomEyes.
Right Half: Using the same procedure for the upper and lower halves, prevent RandomEyes from using the LookLeft index by setting the LookLeft Index property to the LookRight blendshape index number (7 in this example):
To restrain to the Left Half, set the LookLeft Index & LookRight Index properties to the LookLeft blendshape index number (6 in this example).
Quarters:
Upper Right: In this example, restrict RandomEyes to LookUp & LookRight blendshape indexes:
Upper Left: Use the LookUp blendshape index in LookUp & LookDown Index properties, and the LookLeft blendshape index in LookLeft & LookRight Index properties.
Lower Right: Use the LookDown blendshape index in the LookUp & LookDown Index properties, and the LookRight blendshape index in LookLeft & LookRight Index properties.
Lower Left: Use the LookDown & LookLeft blendshape indexes:
Of course, you can also control these values programmatically for more flexibility at runtime. Enjoy!
Comments: No comments yet