Tut
SSS
TutF
TutA
TutC
TutB
TutD
     
 
Procedural Stickman animation Setup
<< < Page: 1, 2, 3, 4 > >>
 
 

Step Nine:
Connect "distance" value of distanceBetween1 node to "valueX" attribute of setRange1 node. Double click on setRange1 node and make following changes:


 
 

Step Ten:
Finally, connect "outValueX" attribute of setRange1 to "scared" attribute Stickman1 node.

This should be it. When the ball approaches stickman, the stickman anmation should be triggered. Remember, move the ballLoc locator, not the "ball" object.

 
  Concept Behind:
The concept behind the setup in Hypershade is:
- "center" attributes of both locators tell the world location of both locators.

- distanceBetween1 node takes in both location info, as point 1 and 2, then calculate the distance between the two locators. The result is stored within the "distance" attribute of distanceBetween node.

- Since the "scared" value of stickman1 group node is 0 ~ 1, the result from distanceBetween1 node may be too large to use. Therefore, setRange node is used to clamp the value proportionally down to 0 and 1. The oldMin and OldMax value of setRange node represent the visible range of the stickman. The larger the oldMax value the further the stickman could see.
 
 

Conclusion:
I hope I explained well, especially on the Hypershade part. Anyway, I have included two working files, one has one stickman reacting to the ball object, another file has five stickman. You can download the working files at:

- One Stickman file.
- Five Stickman file.

Should you have any questions or suggestions, please email me at: sweekimlai@yahoo.com