leo L leo Регистрация 27 Авг 2013 Сообщения 97 Репутация 0 Спасибо 0 Монет 0 2 Май 2016 #1 Вот сама программа: using UnityEngine; using System.Collections; public class PlayControl : MonoBehaviour { public float speed; private Rigidbody rb; void Start () { rb = GetComponents (); } void FixedUpdate () { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical"); Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical); rb.AddForce (movement * speed); } }
Вот сама программа: using UnityEngine; using System.Collections; public class PlayControl : MonoBehaviour { public float speed; private Rigidbody rb; void Start () { rb = GetComponents (); } void FixedUpdate () { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical"); Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical); rb.AddForce (movement * speed); } }
vovhek V vovhek Регистрация 28 Июн 2013 Сообщения 96 Репутация 0 Спасибо 0 Монет 0 2 Май 2016 #2 а тематические форумы для чего созданы.... тут в большинстве место тупой школоты и тролей Позитивный голос 0
Walter949 W Walter949 Регистрация 25 Май 2013 Сообщения 77 Репутация 0 Спасибо 0 Монет 0 2 Май 2016 #3 Сложно было сказать, где ошибка. Позитивный голос 0