Hacker News new | ask | show | jobs
by jbluepolarbear 1902 days ago
Your logic isn’t equivalent: in your Ruby example you precalulate the speed for each axis and only add the value to x and y each frame. In the Unity example you do the inefficient “Speed * new Vector3(1,1,0) * Time.DeltaTime” every frame. If you moved that calculation to the start and then add in fixed update they would be equivalent logic”. That is probably the difference you notice.