Problem with NavMesh Area Masks

Crystalius 3 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3

Can't seem to find areas the right way in code..
People are talking about layer bitsets but still have no idea on how to find them in Bolt.

When I NavMesh.SamplePosition I get layer 0 as 1int and layer 2 I get as 4int.. And the layers keep repeating when cycling through different ints.. If more than 2 areas needs to be checked I would be stuck as I can't precisely get the right area.

Could someone please translate this code (2nd) to Bolt's code:

Would really appreciate it 

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

No prob, workaround possible 😊

Satisfaction mark by Crystalius 2 years ago

Still trying to figure out how to work with those bits. Could someone help please..

I will simply raycast and check objects without NavMesh. Why so complex.. 

If someone has an answer, can't wait to hear it!


Hi Crystallius,

Unfortunately we don't have bitwise operators in Bolt 1 (we will in Bolt 2!), which is what you need for those "<<" operations. Sorry for the inconvenience!