Improving fxFoliageReplicator and fxShapeReplicator - Melv?
by David Dougher · in Torque Game Engine · 05/27/2004 (6:28 am) · 4 replies
I recently used fxShapeReplicator to create a field of boulders as a test. The results were interesting and slightly disappointing. The replicator did exactly what it was supposed to do, but with every rock having exactly the same alignment they looked like a field of clones.
It occurred to me that both fxFoliageReplicator and fxShapeReplicator could take two additional parameters, a value to rotate consecutive stones by and a boolean value to indicate that you want the stones rotated.
So by setting the boolean to true (default value false for older files) the foliage and rocks could be rotated slightly by the value in the second parameter. The rotation would be consecutive and wrap at 360 degrees.
Not a difficult thing to code but I thought I would just check and see if Melv actually had that in there as a parameter already and I just didn't see it.
It occurred to me that both fxFoliageReplicator and fxShapeReplicator could take two additional parameters, a value to rotate consecutive stones by and a boolean value to indicate that you want the stones rotated.
So by setting the boolean to true (default value false for older files) the foliage and rocks could be rotated slightly by the value in the second parameter. The rotation would be consecutive and wrap at 360 degrees.
Not a difficult thing to code but I thought I would just check and see if Melv actually had that in there as a parameter already and I just didn't see it.
About the author
Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence
#2
05/27/2004 (6:49 am)
Ahhh I see. And you can set a minimum and maximum value for each axis and it will generate a random between them. A much better solution. Nice.
#3
05/27/2004 (9:24 am)
You can also adjust the scaling ranges, too, so that it adds even more visual flare...
#4
05/27/2004 (11:23 am)
Thanks, I knew about the scaling ranges to make the objects larger or smaller within limits, but somehow I just never connected the ShapeRotateMin and Max with the ability to randomly rotate the object. Guess I need a bit more sleep.
Torque Owner Eric Hartman