- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I'm fairly new to FlexSim and I'm making my first semi-advanced simulation. I want to have a processor turn metal coils into rollers. Graphic side works perfectly well, but now I'm trying to simulate defects. I've wrote some code which preety much does what i expected:
Object item = param(1);
if (item)
{
double probability = 0.50;
double r = uniform(0,1);
if (r < probability)
{
item.color = Color(255, 0, 0);
item.size = Vec3(2, 1, 1);
}
}
It changes the color and size according to my probability, but I also want to change item's rotation. In the documentation i found the setRotation() method but using item.setRotation(45, 45, 0); doesnt seem to do anything. Is there something I'm doing wrong? Is there another approach to this problem?
Thanks in advance for any advice!
Solved! Go to Solution.