Forum rules - please read before posting.

Problem with triggers/pathfinding

Hello!

I'm having some problems with triggers.

I have a 2D scene, using polygon collider pathfinding. Half the NavMesh is covered by a trigger. Most of the time everything works fine - player can walk in and out of the trigger, triggering actions on enter and exit - but sometimes (without any setting being changed) the trigger blocks the players movement. The actions will still be triggered, but the player won't walk passed the start of the trigger.

Any ideas what could be causing this to happen? 

Comments

  • In what versions of AC and Unity?

    What is the state of your Player's Move with Rigidbody 2D? Inspector field?

    I can only picture this happening if the Trigger's Collider component's Is Trigger field is unchecked - is that the case?  It should be checked by default, if you're using the provided Trigger2D prefab from the Scene Manager.
  • Unity 5.6.1 AC 1.56

    Move with Rigidbody 2D? unchecked

    Is Trigger checked

    Could it be related to having a player prefab in the scene? I was fiddling with character switching options and had a player prefab in the hierarchy, once removed the trigger seems to work correctly...
  • Are there two players in the scene when it occurs?  AC should detect if a player is in the Hierarchy before the game begins, and skip spawning the prefab in the Settings Manager if so.

    If the Trigger is set to detect the Player, it may be running repeatedly if there is another Player in the scene.

    It could even be related to the Actions called from the Trigger.  When you say it blocks movement, do you mean he can't move at all, or just not past the Trigger's boundary?

    It may be that you're in a "permanent cutscene", which you can determine by checking "List active ActionLists in Game window?" at the bottom of the Settings Manager - that will inform you of the current game state, as well as any ActionLists (Triggers included) that are running.
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.