3 votes Vote

Add LayerMask support

Add a selectable LayerMask to the settings area so that it is possible to toggle working on blocks "through" meshes (all, none or only belonging to selected layers). More technically speaking, the editor script could be extended in the settings area for example with something like

script.rayCastLayerMask = EditorGUI.MaskField (AutoRect (), "Raycast Layer Mask", script.rayCastLayerMask, new string[]{"Default, etc."});

so that the call to Physics.Raycast() in the GetCoordsByRay() function could be extended with that rayCastLayerMask argument. Allready tried it out and works well, makes editing terrain less cumbersome when lots of meshes are around.

HaBe , 13.05.2014, 22:36
Idea status: scheduled

Comments

Wraith, 22.05.2014, 20:11
Think it's better use RayCastAll function

Leave a comment