public:t-vien-14-1:lab_8_materials
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:t-vien-14-1:lab_8_materials [2014/03/19 08:43] – [Procedure] hannes | public:t-vien-14-1:lab_8_materials [2024/04/29 13:33] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| - **Empty Scene** Make an empty scene with a ground and a directional light. Position the camera such that you have a good view of the ground plane. | - **Empty Scene** Make an empty scene with a ground and a directional light. Position the camera such that you have a good view of the ground plane. | ||
| - | - **Create Network Manager** Create a new '' | + | - **Create Network Manager** Create a new '' |
| using System.Collections; | using System.Collections; | ||
| Line 66: | Line 66: | ||
| } | } | ||
| </ | </ | ||
| - | - | + | - **Create Player** Create a regular cube (**GameObject-> |
| + | using System.Collections; | ||
| + | |||
| + | public class CharacterMovement : MonoBehaviour { | ||
| + | |||
| + | | ||
| + | public float gravity = 5.0f; | ||
| + | |||
| + | private CharacterController cc; | ||
| + | |||
| + | // Use this for initialization | ||
| + | void Start () { | ||
| + | cc = GetComponent< | ||
| + | } | ||
| + | |||
| + | // Update is called once per frame | ||
| + | void Update () { | ||
| + | if(networkView.isMine) { | ||
| + | cc.Move (new Vector3(Input.GetAxis (" | ||
| + | } | ||
| + | } | ||
| + | }</ | ||
| + | - **Turn Player into Prefab** Drag your '' | ||
| + | - **Create a Spawn Point** Create a new empty game object and call it " | ||
| + | - **Finalize Networking** Choose the '' | ||
| + | - **Build Stand Alone** Go to **File-> | ||
/var/www/cadia.ru.is/wiki/data/attic/public/t-vien-14-1/lab_8_materials.1395218635.txt.gz · Last modified: 2024/04/29 13:33 (external edit)