Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Normals coordinates not bigger than 1 (Solved)

Discussion in 'Scripting' started by christopf, Jan 1, 2016.

  1. christopf

    christopf

    Joined:
    Dec 28, 2015
    Posts:
    17
    I'm trying to get the coordinates of every normal from my mesh (its looking like a donut) and i get a lot of data that seems right and useful. The only problem i have, without transformation of worl/local space the normals aint bigger than 1 (-0.3, 0.7, 0.1, -0.9 etc..). When i transform them to world space they ain't getting bigger then 0,3, when i inverse that move they ain't getting bigger then 10.
    but the players world position is at some points above 20 or 30 although he is standing on the mesh.
    also the mesh is around 100x the size of the character and i already tired different .fbx export and import settings.

    that brought me to the question, if i a) didn't understand the math of normals right, although i thought i did :D, or b) they acting in a different space beside world and local and that i never heard of.

    has anyone an idea or can give me some clarification?
     
  2. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    Code (CSharp):
    1. currFramePosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);
    This is what I used in a game to get the co-ordinates of the mouse, I dont know if you will find this helpful but I will leave it here just in case.
     
  3. christopf

    christopf

    Joined:
    Dec 28, 2015
    Posts:
    17
    Thanks for the reply tale!
    I already figured out that normals are that small because they are for direction purposes only and therefore dont need to be placed next to the face its direction its giving. so they are placed around the world origin (0,0,0) for a lot of reasons to think of, like memory, accessibility, clearance? i don't know but it would make sense to me somehow :>