Game Development Reference
In-Depth Information
3. Let's add a player who can move around the world now. Add a capsule and
name it Player . Fortunately, the demo contains a simple script for con-
trolling a player who you can find (and add) by navigating to Add Compon-
ent | Scripts | Simple Player Control . Now, this doesn't move the object
around on its own; instead it drives a Character Controller object.
Note
Character Controller is a type of an object that you can inherit in your
code classes that many AIs can operate. In this case, there is a basic
Character Controller type to simply move a given object around.
4. When adding the component, just start typing Character Controller in
the search box, and it will show you all the similar component names. Add
Character Controller . Now, the player should be controllable. You will prob-
ably need to increase the speed to 1 to detect the player movement.
Note
Make sure that the game object, and any body parts, do not have collider
components. Controllers detect colliders to determine whether or not they
can move to a given place.
Search WWH ::




Custom Search