Search Unity

_object2world not working?

Discussion in 'Shaders' started by LongMozart, Jul 5, 2011.

  1. LongMozart

    LongMozart

    Joined:
    Jul 5, 2011
    Posts:
    26
    I have just read in another thread that the _object2world matrix is not working in unity 3.3. This seems to be what causes my transformed tangent change unexpectedly when I move the object around. Can some one please confirm to that there is indeed a problem with _object2world and tell me how to get around it. I am doing this for a school research project so really appreciate early response. Thanks
     
  2. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Link? I haven't had a problem yet.
     
  3. LongMozart

    LongMozart

    Joined:
    Jul 5, 2011
    Posts:
    26
  4. LongMozart

    LongMozart

    Joined:
    Jul 5, 2011
    Posts:
    26
    I have overcome the problem. But not sure why it work.

    All I did was, when transforming the vectors, I used "mul(vector, matrix)" insterad of "mul(matrix, vector), and it worked. But I did not understand why. Are the vectors in unity row vectors or column vectors?

    All the examples use "mul(matrix, vector)", clearly it did not work in my case.

    Please can you clarify the vector convention in Unity?
     
  5. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    i never had this problem, and it works as how its supposed to.
    I use mul(matrix, vector) all the time. Probably you are doing something wrong?
     
  6. LongMozart

    LongMozart

    Joined:
    Jul 5, 2011
    Posts:
    26
    .
     
    Last edited: Jul 6, 2011