Search Unity

Layers issue anyone?

Discussion in 'Linux' started by LearningNot, Sep 21, 2016.

  1. LearningNot

    LearningNot

    Joined:
    Sep 30, 2015
    Posts:
    106
    hi i think my layers are bugging like crazy

    Code (CSharp):
    1. RaycastHit hit;
    2.   if (Physics.Raycast (rb.transform.position, rb.velocity * 5, out hit , 1<<10 )){
    3. Debug.log( hit.collider.name);
    4. }
    Debug log gives me hits on evry possible layer even tryed using pubilic LayerMask and setting it in editor getting same stuff, is this normal or am are Layers bugging, will try tomorrow on Win Mashine too

    Tryed on Windows mashine to same resualts duno whats the issue shoudent it not show colliders that are not under 1<<10 layer?
     
    Last edited: Sep 21, 2016