Answer by CHPedersen
First of all, correct the code. It's wrong, and won't compile. It should be: public Vector2 speed = new Vector2(50, 50); Vector2 movement = new Vector2(speed.x * inputX,speed.y * inputY); Notice the...
View ArticleAnswer by jamesflowerdew
input on the x and y will be between 1 and -1 depending on the player's actions (0 if they are not touching anything ;)). mutiplying these by set values will convert these actions into movement at in...
View ArticleAnswer by CHPedersen
First of all, correct the code. It's wrong, and won't compile. It should be: public Vector2 speed = new Vector2(50, 50); Vector2 movement = new Vector2(speed.x * inputX,speed.y * inputY); Notice the...
View ArticleAnswer by jamesflowerdew
input on the x and y will be between 1 and -1 depending on the player's actions (0 if they are not touching anything ;)). mutiplying these by set values will convert these actions into movement at in...
View Article