Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    6

    Cant Get Basic #rd Person Controller to Function :(

    I am going thru the video using the latest version of unity. And I cant get the Basic controller and Motor to function properly.
    It has the character controller component and I went thru the videos twice :

    TP_Controller

    Code:
    NO LONGER NEEDED
    TP_Motor

    Code:
    NO LONGER NEEDED
    When hit the W key either nothing happens or the character moves up in the air. And the Unity editor is showing No errors. I did not use a compiler I used Unity's default editor.

    Any help would be Awesome
    Last edited by fatgav; 04-12-2011 at 10:32 PM. Reason: Code removed as it wasn't the source of the problem.

  2. #2
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    The problem is with your model, not your code... Sounds like you modelled it in a z-up rather than y-up application (probably Max or Blender..?); if that's the case, you'll need to re-export the model so it's facing in the +Z direction (ie, lying on it's back with feet pointed towards -Y).

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  3. #3
    Join Date
    Mar 2009
    Posts
    6
    I'm not sure that is it cause I'm testing on a default Unity capsule and a Unity cube. Both with character controllers.

  4. #4
    Join Date
    Mar 2009
    Posts
    6
    Yeah I just double checked The default object lie on the proper axis. Either I tyed something wrong or the code simply doesn't work.

  5. #5
    Join Date
    Apr 2009
    Location
    Rochester, MN
    Posts
    179
    Do this if you can: Run your game, select what your using as your character and take a screen shot of the options panel. Upload it somewhere and link it here. I'm just curious since from what I can tell your code looks OK.

  6. #6
    Join Date
    Mar 2009
    Posts
    6
    Here you go :


  7. #7
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    If that's the starting position of the 2 cubes, it's probable that their colliders intersect or that the camera is starting inside another object... that could cause this sort of strangeness.

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  8. #8
    Join Date
    Mar 2009
    Posts
    6
    It seemed to have been a collider issue from the cube i was using as a nose. Thanks But that make me wonder why and how difficult it will be to add objects to a final player.

  9. #9
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    Glad you got it sorted! In terms of adding parts to a character; there should be no problems as long as you check that there's no colliders on subobjects, all translations / orientations /scales match, etc.... These are things that you need to consider whatever engine you're working with, btw, not just in Unity.

    Cheers, G.

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  10. #10
    Join Date
    Apr 2009
    Location
    Rochester, MN
    Posts
    179
    There are a lot of tricks to do, and doing collisions on only certain objects is one of them. Here is a look at how you go about using Layers to dictate what collides with what: http://unity3d.com/support/documenta...detection.html With this information you can then make all your cubes be on a layer called "Player" or something and make them not collide with other "Player"s on that layer. One problem with doing all this is the limit of layers.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •