0 votes

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():

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

Thank you

asked Jun 15, 2016 in Engine by sub889 (14 points)

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

Yes, it does :(

1 Answer

0 votes

It might have to do with this: https://github.com/godotengine/godot/issues/2043

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

answered Jun 15, 2016 by JTJonny (523 points)
edited Jun 16, 2016 by JTJonny

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.