Search code examples
anylogic

How can I integrate a rotating camera view in my anylogic model?


I have been trying to incorporate a camera that rotate 360 degree around my model automatically.


Solution

  • Define a camera as below. When navigating to it, ensure to enable the follow flag like this:

    my3Dwindow.setCamera(cam_Floating, true, 500l);

    enter image description here NOTE:

    • the sin and cos notations!
    • the X & Y initial values (“680”) mark the center point of the rotation
    • the divisor (“7000” below) is the duration for 1 circle, in ms
    • the multitpliers (“1000” for X aboveand “600” for Y) stretch the circle radii (so above we have not a circle but an oval along the X axis)