Search Unity

Wind - First Person Controller?

Discussion in 'Editor & General Support' started by CelticKnight, Jan 31, 2015.

  1. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    Hello Guys,

    I just have a quick question. I have just been playing around with a First Person Controller on my terrain, and I noticed in the inspector that the X and Z values were changing and then noticed that I could see in "Game view" very small changes like my character was sliding in the direction of the wind.

    Is that supposed to be happening? I mean I like my trees/leaves moving about in the wind but I never thought my first person controller would as well.
     
  2. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    x and z changing is completely normal if you're moving since they are forward back and left right.

    The other part I'm not sure unless maybe you have some really strong wind lol.

    Is that a rigidbody controller?
     
  3. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    The X and Z coords were changing when, I wasn't using keyboard (or mouse).

    I have been using the book "Beginning 3D Game Development" as my reference to learning Unity, so, I'm pretty new to Unity and don't have a clue as to what's normal and what's not - and why I asked.

    Could it be due to having sliding enabled and the wind causing the controller to slide? I tried adding a rigidbody to the controller thru Component->Physics->Rigidbody it didn't seem to have an affect but I was using just the default parameters.
     
  4. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    I think I have that book in pdf form someplace.
    Could you tell me what chapter and such in the book you are at?

    I'll see if I still have it and take a look maybe I can help but I am not sure exactly.
     
  5. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    Chapter 5 definitely contains the controller - Navigation and Functionality. I had to go with whatever the book said to to get it working because that is a little above my paygrade at the moment - there is some funky maths going on :confused:. The Windzone is introduced in the later part of Chapter 4: Terrain Generation. I had some trees that I wanted blowing about in the wind, that I bought in the asset shop, they looked incredibly cool in the demo the guy made and so wanted the same.