Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

Object in build moving slower.

$
0
0
Just finished the Ruby tutorial and went to build the game when for some reason everyone movement speed were significantly slower than in the editor and only during the default settings low/very low or when `QualitySettings.vSyncCount = 0`. It this is only in build, everything plays normal in the editor. -- The code under should be about the same as found in the tutorial and as seen it does use Time.deltaTime for movement so that shouldn't be the issue i believe. private Rigidbody2D rb2d; private Vector2 position; void Update() { float horizontal = Input.GetAxis("Horizontal"); float vertical = Input.GetAxis("Vertical"); Vector2 move = new Vector2(horizontal, vertical); if(!Mathf.Approximately(move.x, 0.0f) || !Mathf.Approximately(move.y, 0.0f)){ lookDirection.Set(move.x, move.y); lookDirection.Normalize(); } position = rb2d.position; position = position+move*speed*Time.deltaTime; rb2d.MovePosition(position); }

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>