Density Maps for Materials moving along Conveyors in Anylogic - anylogic

I'd like to show congestion areas on a conveyor network by using the density map included into the Material Handling Library, but so far I haven't find a way to do so, as material agents movement cannot be tracked by the density map, but it only accepts transporters or pedestrians (both in free space movement mode).
So I thought I could create a "parallel" agent (for instance, a pedestrian) that could get attached to my material and move along with it. Then I could set the pedestrian visible property to "no" so that it does not show in the animation, or make it really small as an alternative approach.
The problem when doing the pickup/dropoff logic is that the pedestrian disappears from the scene when it gets picked up (although it's internally batched with the material) so the density map shows nothing.
Same thing happens if I try to seize/release a transporter, as they do not travel along the conveyor with the material agent.
Any idea on how to get this?
Thanks a lot in advance!

You won't be able to drag pedestrians, they actively move via PedMoveTo blocks. This is a creative idea but it will not work.
You will have to code your own heatmap using dynamically colored rectangles that you animate on top of conveyors. Doable, but might be more work than is really required for your purpose ;)

Related

How can I read through multiple layers of a tilemap to determine what tiles exist at a clicked on position in a script for unity?

Whats going on is, I want to detect what the tile I'm clicking on is, but I'm unsure of how I can do that if my tilemap consists of multiple layers. For example, with the way my script is currently set up, the ground level 'island' can be passed into the script as the 'map' variable, but then I wont be able to see if I am clicking on the house, which is in a separate layer. I'm new to Unity so I apologize if I'm explaining it badly, but basically I need a way to look through multiple layers of the tilemap to see what is being clicked on. In the future I would want to implement some sort of system in which a tile could have some sort of modifier sprite on top of it in a higher layer, so I would want to see the tiles in both layers, another reason I'm wondering if there's a way to cycle through those tiles.

Move pawn/character to random point within specific area on the map

I'd like to add some sort of "properties" to different areas of the level so they can affect NPC behavior.
Level layout:
level layout
What NPC behavior I want to achieve:
NPC can freely walk around Area #1
NPC isn't allowed to go to Area #4 in general but it may decide to go there in some exceptional cases
If NPC wants to interact with the player he has to go to Area #2 and check if player is in Area #3. If player is not there, NPC have to wait until player enters Area #3
I know that I can affect the path NPC chooses by using navigation modifier volumes and changing navigation cost in some areas.
But, based on goals above, I also need at least the following
I need to get random point within specific area (for goals #1 and #3)
I need to check if some actor is in specific area (for goal #3)
And I guess I don't really need "navigation cost" feature, since if I could get random point in specific area, I would be able to control where NPC goes anyway
The questions are:
What actor should I use to mark some areas as "NPC can go here if they want to walk around", "NPC can go here if they want to interact with player", etc?
If volume is the best option, what volume should I use? My concerns about Navigation Modifier volume is that I don't really need to modify navigation process by blocking it completely or adjusting its cost.
I have used the NavMeshBoundsVolume to define the area that my AI character is allowed to be in.
Then I used blackboards and set points the AI could walk around too, adding variables enabling or disabling a point. In your case you could have a variable that is true when the player is in area #3.
I've included a picture of my Behavior Tree, so that you can get an idea of the how a flow might look. This is for an "enemy," but you could simply have the AI follow the character to a specific area instead of playing the attack animation and applying damage.
Here is a really good series on AI in Unreal Engine. It's UE4 but if you are familiar with the engine you shouldn't have a problem applying it to UE5.

Is it possible to obtain the shape of an IRL object from the slam algorithm to hide 3D objects?

I want to do some test with the AR in Unity, so my idea is to use the ground plane detection of the arcore to instantiate a ring. The ring is made of segments and I want to use an obstacle between the camera and some segment to hide these segments.
I have thought to use the slam to get the shape of the obstacle and use the coordinates to hide (disable or change shader/material) or not the segments behind the obstacle.
I do some researches about Vuforia and I know they use the slam but it does not seem that we can access the shape directly from Vuforia so I thought to use the arcore directly. I think it may be done with spatial mapping.
Because I am not very experienced I prefer to ask about the possibility to do it and if I am in the good way.
If I understand correctly, the term you are looking for should be "Occlusion Management". Vuforia. There is a sample package in the asset store, but I don't know how much value it can offer to your cause. Look here
You could as well take a manual approach and integrate your obstacle as Image- or Model-Target, so that you can simply use a virtual replica of your obstacle that hides everything behind it. This however means that your obstacle would have to be always the same object, so I am not sure if this approach is suited for your needs. But this would be the easiest and cleanest way imho.
You can find many tips to get around occlusion problems here

NetLogo: Unwrap World in 3D

I have what I think should be a very simple problem. In 2D NetLogo, I can easily "unwrap" the world by checking the boxes in the Configuration Window. However in 3D, these check boxes are not accessible as they are in a light grey text. Does NetLogo 3D not allow unwrapping? or is there something I'm missing?
According to http://ccl.northwestern.edu/netlogo/docs/3d.html :
You'll also notice on the left side of the Model Settings that there are options for wrapping in all three directions, however, they are all checked and grayed out. Topologies are not yet supported in NetLogo 3D, so the world always wraps in all dimensions.
If NetLogo 3D development were still moving forward, this would certainly be one of the highest priority fixes. But NetLogo 3D currently isn't moving forward, and hasn't been for some years, for lack of funding and/or interested open source developers. Know anyone with money or time on their hands?

How do I create a floor for a game?

I'm attempting to build a Lunar Lander style game on the iPhone. I've got Cocos2D and I'm going to use Box2D. I'm wondering what the best way is to build the floor for the game. I need to be able to create both the visual aspect of the floor and the data for the physics engine.
Oh, did I mention I'm terrible at graphics editing?
I haven't used Box2D before (but I have used other 2D physics engines), so I can give you a general answer but not a Box2D-specific answer. You can easily just use a single static (stationary) Box if you want a flat plane as the floor. If you want a more complicated lunar surface (lots of craters, the sea of tranquility, whatever), you can construct it by creating a variety of different physics objects - boxes will almost always do the trick. You just want to make sure that all your boxes are static. If you do that, they won't move at all (which you don't want, of course) and they can overlap without and problems (to simulate a single surface).
Making an image to match your collision data is also easy. Effectively what you need to do is just draw a single image that more or less matches where you placed boxes. Leave any spots that don't have boxes transparent in your image. Then draw it at the bottom of the screen. No problem.
The method I ended up going with (you can see from my other questions) is to dynamically create the floor at runtime and then draw it to the screen.