- 29 名前:名前は開発中のものです。 mailto:sage [2014/09/21(日) 20:01:55.27 ID:DRNI4c1v]
- 質問失礼します。オブジェクトをスワイプで動かすため
以下のスクリプトを使用してます。 #pragma strict var speed : float = 0.03; function Start () { } function Update () { if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) { var touchDeltaPosition:Vector2 = Input.GetTouch(0).deltaPosition; transform.Translate (touchDeltaPosition.x * speed, touchDeltaPosition.y * speed, 0); 実機で動かした場合、 実機の画面の大きさで、オブジェクトのスピードが変わってしまします。 7インチで調度よくても、4.3インチだと倍くらいのスピードに・・・。 なにか解決法はあるのでしょうか?
|

|