i need to do a line cast that ignores user layer 8, labeled waypointmask, but im not sure what to put in as the peram the code is below. and in c#
i believe its supposed to be an int but i’ve tryed using 8 and this does not work
if(Physics.Linecast(b.position, a.position, out hit,??????waypointmask???????))
{
do stuff
}
Yeah, it’s a wrong forum. Could a mod please move it?
On topic:
Usually when I need to have a raycast mask, I do not use ugly 1 << N in my code, I use a public LayerMask variable and set the proper mask from there. Much easier to work with.
public LayerMask RaycastLayers;
if(Physics.Linecast(b.position, a.position, out hit, RaycastLayers))
{
do stuff
}