Skip to content

Comments

Fix movement forward, backward, left, and right#1

Open
toivocat wants to merge 1 commit intoGarbajYT:masterfrom
toivocat:patch-1
Open

Fix movement forward, backward, left, and right#1
toivocat wants to merge 1 commit intoGarbajYT:masterfrom
toivocat:patch-1

Conversation

@toivocat
Copy link

Movement was:

if Input.is_action_pressed("move_forward"):
	direction -= transform.basis.z
elif Input.is_action_pressed("move_backward"):
	direction += transform.basis.z
if Input.is_action_pressed("move_left"):
	direction -= transform.basis.x
elif Input.is_action_pressed("move_right"):
	direction += transform.basis.x

But needed to be:

if Input.is_action_pressed("move_forward"):
	direction += transform.basis.z
elif Input.is_action_pressed("move_backward"):
	direction -= transform.basis.z
if Input.is_action_pressed("move_left"):
	direction += transform.basis.x
elif Input.is_action_pressed("move_right"):
	direction -= transform.basis.x

Movement was:

	if Input.is_action_pressed("move_forward"):
		direction -= transform.basis.z
	elif Input.is_action_pressed("move_backward"):
		direction += transform.basis.z
	if Input.is_action_pressed("move_left"):
		direction -= transform.basis.x
	elif Input.is_action_pressed("move_right"):
		direction += transform.basis.x

But needed to be:

	if Input.is_action_pressed("move_forward"):
		direction += transform.basis.z
	elif Input.is_action_pressed("move_backward"):
		direction -= transform.basis.z
	if Input.is_action_pressed("move_left"):
		direction += transform.basis.x
	elif Input.is_action_pressed("move_right"):
		direction -= transform.basis.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant