Forum rules - please read before posting.

2D game: Previous hotspots created with box collider instead of box collider 2D?

Hello, I'm working on a new 2D game with AC 1.78.0. I set up a few rooms with hotspots that worked fine yesterday, but today I ran the game and had issues. Unfortunately, I am unable to track why it changed.

I noticed that when I create a new hotspot, the engine can detect it but the collider is different from the previous one. The older hotspots collider components are to Box Collider, but the new hotspots have Box Collider 2D. Changing them would probably make it work again, but why were they Box Colliders instead of Box Collider 2D in the first place?

Comments

  • AC will attach either a 2D or 3D collider to Hotspots based on your game's Camera perspective setting, as set in the Settings Manager's "Camera settings" panel.

    This setting can also be overridden on a per-scene basis, but it'll say so at the top of the Scene Manager if this is the case.

    If Box Colliders were being added before, it sounds like the game may have inadvertently been set to 3D instead of 2D.

  • Thanks! I'm sure how I ended up in this state in the first place since I mentioned the game was running without problems, but I was able to resolve it by replacing the hotspot colliders with 2D colliders. I checked the camera settings and looks like things are set correctly moving forward.

  • I had the same problem recently with some hotspots not working that were set to Box Collider instead of Box Collider 2D. The game has always been 2D and had Camera settings for 2D.

    The problems started after the Unity project crashed several times one day when just using the editor, for example just clicking on something in the hierarchy (I am using Unity Silicon and before updating Unity to a level with a fix this crashing when just clicking on something in the editor was happening quite often to many Unity Silicon users) .

    I am not sure I will ever get an explanation of what happened in Unity to cause this change to SOME hotspots in my game but have added it to my list of things to check in future if strange behaviour reoccurs. Fingers crossed it doesn't happen again!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.