0
votes

I have a person agent who has a 3D representation of a man (default 3D pic of a human from anylogic). Can we change color of that 3D person agent's representation based on states? For example, when a agent moves from state A to B, it will change color from yellow to red. How to do that? I tried with shapeFillColor but anylogic is not detecting that 3D human representation as a shape (like polygons, triangle), statechart is not taking my command. Is it like we can only change the agent's color if that agent is manually drawn with some polygon? Will appreciate any feedback. Thanks,

agent's 3D representation

1

1 Answers

0
votes

You can do it as follows, it is not 100% intuitive:

  1. Check your 3D model properties and note the material names (for example "Material__6__Surf" --> NOTE: it has 2 underscores before and after the number!!) enter image description here
  2. At runtime, simply call worker.setColor("Material__6__Surf", red); and the respective color will change (in this case the trousers)