Jump to content

Spawner Collision Mask offsets weirdly in Gaia Pro 2021


ymisofine
Go to solution Solved by Peter,

Recommended Posts

I'm running into an issue with a collision mask on a spawner for game objects.  I've set the collision mask to the following:

blend mode - multiply, strength transform = default (diagonal upward), respected collisions = Layer Game Object with appropriate layer checked with padding of 10.  When I visualize the spawner I get an area that matches the object but is somewhat offset.  If I move the building say north, then the mask moves south as shown in the image below.  I've messed with different settings but nothing seems to correct it.  Any ideas what causes this issue? I'm using Unity 2022.1.14f1 and the current version of Gaia (3.3.0-c5)

 

spacer.png
 

Link to comment
Share on other sites

  • Solution

Hi @ymisofine, are you using HDRP or URP? If you are, could you please check under Edit > Project Settings > Player to see if you have either the entry for
HDPipeline (if using HDRP)

UPPipeline (if using URP)

in the scripting defines section?

image.png

If not, could you please try to add the entry, hit apply and try to refresh the collision mask after?

 

Some background on why I'm asking this: The collision mask is based on rendering an image taken from an invisible camera. In the SRPs we need to flip that image because we get an inverted image as a result. We had cases in the past where this flipping was causing issues for some users because they lost the scripting define in their project at some point, which means that the flipping did not take place when the collision masks were rendered.
We did also have extremly rare cases (I think 3 in total so far) where users would get a non-inverted image as a result, therefore the flipping itself was causing the issue. It is unclear why this is happening for that small amount of users, but in this case it was fixed by commenting out the flip in code. If the scripting defines are not missing, you can try to comment out the lines 158 -163 in Orthographic Bake.cs:

image.png

Link to comment
Share on other sites

I did have the uppipeline line in the player settings already so I switched the renderer to built in to test and sure enough the issue went away. I've switched back to uppipeline and ended up commenting the code. 

 

Thanks a ton for the help on this!

  • Like 1
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
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...