Movement seems laggy when moving a sprite by Vector2(1, 0.5)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sub889
:warning: Old Version Published before Godot 3 was released.

Hello, I have a tileset in isometric mode, where I want to move a sprite along the isometric axis (which are rotated by 45 degrees, I assume). So, in order to achieve this, I increase the position by Vector2(1, 0.5) for example (right movement).
Take the isometric game example, I modified it as follows (just the right movement):

extends KinematicBody2D
const MOTION_SPEED = 160 

func _fixed_process(delta):
	var motion = Vector2()	
	if (Input.is_action_pressed("move_up")):
		motion += Vector2(0, -1)
	if (Input.is_action_pressed("move_bottom")):
		motion += Vector2(0, 1)
	if (Input.is_action_pressed("move_left")):
		motion += Vector2(-1, -0)
	if (Input.is_action_pressed("move_right")):
		motion += Vector2(1, 0.5)	
	motion = motion.normalized()*MOTION_SPEED*delta
	motion = move(motion)

func _ready():
	set_fixed_process(true)

By doing this, however, the movement looks a bit odd, because it’s not very fluid. Do you know why this happens?

Thank you

Does it happen when moving at speed (2,1)? If it doesn’t, then there is a rounding issue probably.

Bojidar Marinov | 2016-06-17 07:47

Yes, it does :frowning:

sub889 | 2016-06-17 15:09

:bust_in_silhouette: Reply From: JTJonny

It might have to do with this: Driver-related jitter in motion test · Issue #2043 · godotengine/godot · GitHub

In the examples there is a test you can run called Motion Test.

I tried the motion test, on my pc (ubuntu 16.04 with open drivers, i7 + hd7670) runs fine, but when I try it on my android phone (samsung galaxy s4 with cyanogenmod), the cars lag a lot.

sub889 | 2016-06-16 07:26