Unity 3D Turorial 03 - Making a Character

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,706
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 8, 2010

This tutorial gets into making a character that can move and an environment to move him in.

var speed = 3.0;
var rotateSpeed = 3.0;
function Update () {
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.for ward);
var curSpeed = speed * Input.GetAxis ("Vertical");
controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController)

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (TDCnoho)

  • Why not use the character controller in the unity assets? You can jump there, there are advanced features, and so on. I woulds say that it is best to simply tweak it for your needs rather than program it from scratch.

  • @sereda008 The character controller that comes is simply a Component that you attach to a game object which determines certain things like the way it reacts to physics (or doesn't, rather), it doesn't have any inherent movement, you have to add that yourself. This particular script is for use with a Character Controller.

  • can you send me a screenshot of the specific error you are having?

    The demo project is generally installed in your documents when you install unity. It's called Bootcamp for 3.0, and I think it's Island Demo for 2.6

Top Comments

  • To everyone getting errors,

    You need to change this line:

    var forward = transform.TransformDirection(V­ector3.for ward);

    He made a typo, the Vector3.for ward should be Vector3.forward, fixed it for me!

    (Thumbs up so people don't get this error again!)

  • guys your error is hat in desc it says "for ward" when its meant to be "forward"

see all

All Comments (36)

Sign In or Sign Up now to post a comment!
  • @GreenGameProductions Chill out man. Seriously!

  • @GreenGameProductions

    Protip:

    The more exclamation marks you use the more immature you appear.

    You're making a fool out of yourself, so don't expect any actual response.

  • How the fuck do you get the charecter controller!!!!!!!!!!!!!!!!!!!!­!!!!!!!!!!!, this tutorial is shit if you dont know how to add the fucking shit!!!!!!!

  • @ThomasMosey it fixed it, thanks.

  • 1 person disliked. 1 person dies every second in this case person meaning computer. 1 person's computer can't handle the capsule in untity 3D.

  • do i need blender for what you did there?

  • thanks man !!!! i love you ,.. i want to know this like...... 3 months .. thanks.. and a very excellent tutorial

  • is this a CC or JAva or Boo

  • I copied the script but it says there are errors now can some one tell how to fix them or something

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more