Game Development Reference
In-Depth Information
6. Select the AttachedColliders member of the cloth object. Set the size to 2 .
Drag-and-drop the first pole into the first collider reference and the second
pole into the second collider reference. This will bind the banner to both
poles.
7. Create a material with a nice checkerboard material, and attach it to the cloth
component.
8. Drag-and-drop this object to the project tab, and name the Prefab GiantFlag.
9. Create two instances of this GiantFlag Prefab—one at the starting line and
one at the finish line of the path. Your flag should look something like the fol-
lowing screenshot:
Congratulations, you have created two banners for the game to mark the start and
finish lines of the race! Click on the cloth simulation component of the GiantFlag
Prefab, and experiment with the external acceleration, random acceleration, and fric-
tion variables to achieve different levels of motion in the banners themselves.
Search WWH ::




Custom Search