Unity/연습

Unity/연습

[Unity] 자동차로 이것저것

using System.Collections; using System.Collections.Generic; using UnityEngine; public class FollowPlayer : MonoBehaviour { public GameObject player; private Vector3 offset = new Vector3(0, 5, -7); private float turnSpeed = 40.0f; private float horizontalInput; private bool pressF = false; // Start is called before the first frame update void Start() { } // Update is called once per frame void La..

Unity/연습

[Unity] 유사 플래피 비행기

using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerControl : MonoBehaviour { private float speed = 20; private float turnSpeed = 120; private float verticalChange; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { verticalChange = Input.GetAxis("Vertical"); transform.Rotate(Vector3.r..

Unity/연습

[Unity] 키 입력에 따른 자동차 이동과 장애물 충돌

using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerControl : MonoBehaviour { // Private Variables private float speed = 15.0f; private float turnSpeed = 40.0f; private float horizontalInput; private float verticalInput; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { // This is whe..

tmd1
'Unity/연습' 카테고리의 글 목록