Jump to content

GeNa spawners not obeying collision rules


Go to solution Solved by Manny,

Recommended Posts


I've been having this issue intermittently, and currently am unable to get any prefab / prototype to follow collision rules in my scene. Anyone else experience this? On the discord in the past I found some mentions of it, followed by a dev indicating it was fixed. No mention of it so far here. 

Unity v2021.1

GeNa Pro v3.3.15



GeNa spawner does not obey any collision rules. Bounds, or Point


Steps to reproduce (only describing the Bounds issue here):

1) Create a new GeNa spawner.

2) Create a new prefab, add a simple cube. The cube by default has a box  collider. Set the cube's layer to something specific.

3) Create a new palette in the GeNa spawner, use default settings and add the cube prefab as a prototype. 

4) Under Spawn Criteria, ensure the Ground Layer is set to the appropriate layer. 

5) Ensure Check Collisions is set to Bounds

6) Ensure the cube prefab's layer is listed under Collision Layers.

7) Spawn cubes inside themselves.


Thanks for any help you can provide!


Link to comment
Share on other sites

Hey there @FoxTheDog,

This is a system in GeNa that we are looking to improve. The issue with this system is that, originally it used to work with raycasts + box casts but the performance was incredibly slow so we switched to using compute shaders and handling collisions ourselves.

Unfortunately, I've noticed that the algorithm we're using for this doesn't quite work the way we intended. It appears that the 'Bounds' is referring to the separation of existing objects in the scene and doesn't take into account the size of the objects you are currently trying to spawn.

Upon further examination, here's what I've discovered happening visually:
This is a valid spawn:

This is an invalid spawn:

I've reported this as a bug internally and we'll look into fixing this as soon as possible.

In the mean time, a simple workaround would be to utilise the 'Bounds Extents' value in the Spawn Criteria to achieve the desired results. 

Could I also suggest that you follow this topic so that I can provide you with an update for when this gets fixed in future updates?

Link to comment
Share on other sites

Thanks for looking into this @Manny 

Great to hear this is on the list to see a fix. I rely heavily on procedural spawning.

Im confused by the workaround involving 'Bounds Extents' at this point though, no matter what I set that value to, sequential spawns of individual objects still overlap one another. Further, if I use GeNa to spawn say 3 instances of a single prototype (in the editor or at runtime) within some volume, the likelihood that the prefabs overlap is fairly high. Any recommendations on how I can get around this? Does the behavior I'm describing differ from you you found in your testing?


** editing this as its marked as Solved, but there still isn't a clear solution to me **

Thanks again!

Edited by FoxTheDog
Link to comment
Share on other sites

OK - more updates. 

Looking through the Discord history for GeNa Pro, others have struggled with this as well. I was confused by the fact that the bounds extents wasnt doing anything either, despite the proposed workaround. Some of the Discord users indicated the problem was intermittent, and when creating a new scene, it was more likely to work.

I went ahead and created a new scene and the bounds extent workaround worked. Its not ideal, given that you might be trying to spawn from a collection of objects of multiple sizes, and a fixed bounds extent requires you specify the bounds of the largest object to avoid overlaps. I've verified that in a new scene with a basic Gaia terrain, the bounds extents solution also works. In my development scene however, spawning doesn't work. Any ideas on how to troubleshoot this?

Here's what i've tried in an existing scene where collision spawning isn't working:

1) Creating a fresh palette with simple cube prototype

2) using bounds extents, bounds, point criteria

3) creating a simple plane and trying to spawn on it rather than on the unity terrain.

** edit**

4) Additionally, tried deleting and re-importing the GeNa folder


** edit **

5) final update - burned it with fire, started with a fresh scene and saved / loaded my biomes and spawners. Things appear to be working with the 'bounds extent' workaround for now. I wish we had some clarity on the reason this periodically stops working. Makes me  appreciate the ability to turn biomes into assets!


-- Valid spawn experiments --

Despite the bounds extent not working as intended in some development scenes, I can force the spawner to behave (only using bounds extents, bounds is still bugged). If I use shift-click inbetween spawns to update the gizmo, the bounds extent parameter is respected, and subsequent spawns avoid the previously placed spawns. They dont however respect eachothers bounds, so this isn't a workaround or a fix.. but it might help diagnose the issue. See attached images for more context.

Happy to chat directly on Discord to help step through the problem further.

Thanks for advice you can provide!







Edited by FoxTheDog
Continuing to troubleshoot the issue
Link to comment
Share on other sites

I broke it again. Consistent with some chats in the Discord, objects with LOD groups appear to fail to obey collisions in all point, bounds, or bounds extents modes. Once a prototype with a LOD group object is added to the spawner, even basic cubes from the same spawner will fail the same collision checks. Hope this helps troubleshoot the issue, I'm sure I'm not alone in recognizing that one of the main selling points of GeNa is its dramatic simplification of spawning / subspawning of GameObjects that follow some basic rulesets.

Link to comment
Share on other sites

Hey @FoxTheDog,

Thanks for all the info you've provided on this issue! Just to let you know, I am actually looking into this today so I'll keep you posted with my developments 🙂

Link to comment
Share on other sites

Great news @FoxTheDog,

After thoroughly investigating the issue, I have finally found a fix for the bug and it will be included in the next upcoming patch this week (3.3.16)!

I was able to replicate the issue every time by not pressing Shift + Click before each spawn and just Ctrl + Clicking away from the original spawn point. It appears that an internal process was running at irregular times in the workflow. But that has now been rectified and will be included in the next patch. Thank you for your patience! 😁

Link to comment
Share on other sites

  • Solution

Happy to report, the new version of GeNa Pro (3.3.16) addresses this issue!

Check out the latest here:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...