Forum rules - please read before posting.

Unwanted behaviour with polygon collider

edited August 2014 in Technical Q&A
Hey there,

In my game I don't allow the player to move around freely, but I still have a navmesh for when I need to do some Move To Point cutscene action. I recently switched to Unity2D mode and I'm having some trouble recreating the functionality with the polygon collider.

In TopDown mode I used to have a navmesh segment where I unchecked the mesh collider component. This gave the characters a navmesh to pathfind across while blocking any player clicks on said navmesh. But if I do the same with the polygon collider, instead of pathfinding to the marker they are supposed to move to, they move to the edge of the collider shape and follow along the outside. If I enable the polygon collider component again it works fine, but obviously this also enables player input on the navmesh.

Is there another way to block clicks on the navmesh?

Comments

  • Use the Engine: Manage systems Action to disable Movement entirely.  This is the "safer" way to do it, rather than unchecking components.
  • Ah yes that works great, thanks. I opted to put the code for it in a custom script that's present in every scene, so that way the movement always gets disabled regardless of which scene I test in the editor :)
  • Interesting.  Would the ability to run an ActionList asset when the game starts (regardless of scene) be useful?
  • Hmm yeah that might be pretty cool for some initialisation stuff like this! Most of the beef I have right now is with the menus, locking it on game start works well but on a restart it usually stays unlocked. An actionlist that takes care of that right after the game boots up would be a nice feature.
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.