Mel help
Hello,
I'm trying to create a number of cones randomly on the ground using mel. so far i have the following, but cant figure out how to get the cones on the ground. vector $rand; for ($i = 0;$i<20;$i++) { $rand = sphrand(10); cone -p ($rand.x) ($rand.y) ($rand.z); } If anyone could, it would be greatly appreciated |
What exactly is your ground?
|
It can be any flat surface like a polygon plane.
|
you have a random value on the y axis, would that make it so that they would go anywhere rather than stay on one plane?
|
Yeah feel free to change the coding in anyway,
as long as the cones are placed randomly on a flat surface thanx |
float $xpos;
float $ypos; float $zpos; for ($i = 0;$i<20;$i++) { $xpos = rand(-10, 10); $ypos = 0; $zpos = rand(-10, 10); cone -p $xpos $ypos $zpos; } that's what i'd do. You could make it "clever" by making take the size of the surface into account but I don't have time to write that atm. :ninja: Alan |
All times are GMT. The time now is 07:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018