Adam's Lair Forum
https://forum.adamslair.net/

Transform.MoveBy() speed chages when ran in VS debugger
https://forum.adamslair.net/viewtopic.php?f=16&t=1252
Page 1 of 1

Author:  gregnk [ 2018/09/15, 04:45 ]
Post subject:  Transform.MoveBy() speed chages when ran in VS debugger

Ive noticed that when the game is ran in the VS debugger, an object that is moved with Transform.MoveBy() several frames in a row moves unusually faster than it would when ran in the editor or with the standalone launcher. Why does this happen?

Author:  SirePi [ 2018/09/15, 07:37 ]
Post subject:  Re: Transform.MoveBy() speed chages when ran in VS debugger

My guess is that when running in debug the game is not capped at 60FPS, thus having the MoveBys being called much more quickly than expected, and appearing to move faster than it should.

Try to multiply your MoveBy Vectors by Time.TimeMult (possibly with some further factors if the value is too big/small by itself) and you should be set.

Author:  gregnk [ 2018/09/15, 17:01 ]
Post subject:  Re: Transform.MoveBy() speed chages when ran in VS debugger

Oh yeah, I forgot about using Time.TimeMult. Now it's fixed.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/