0
電車を下に押し上げるとジョイスティックが上下に動いてジョイスティックが期待どおりに動かず、逆もあります。画面上のジョイスティックが1つで5
私はそれを逆にしたいと思います。
ここにコード
using UnityEngine;
using System.Collections;
using UnityStandardAssets.CrossPlatformInput;
public class joystick : MonoBehaviour {
public float TrainSpeed = 50;
public float TrainRotateSpeed = 50;
// Use this for initialization
void Start() {
}
// Update is called once per frame
void Update() {
transform.Translate(0f, 0f, TrainSpeed * CrossPlatformInputManager.GetAxis("Vertical") * Time.deltaTime);
transform.Rotate(0f, TrainRotateSpeed * CrossPlatformInputManager.GetAxis("Horizontal") * Time.deltaTime, 0f);
}
}
は私がしようとしますありがとう、私は知っていた - どこかに行かなければなりません –