Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical movement and snap 2d transforms to pixel option causes jitters #63185

Open
Tracked by #86837
CodeLazier opened this issue Jul 19, 2022 · 0 comments
Open
Tracked by #86837

Comments

@CodeLazier
Copy link

Godot version

Godot4 a12

System information

win10 vulkan desktop

Issue description

jitters.webm

I don't know if this is a known issue or a pending issue, and I'm currently finding it to report it first.

CharacterBody2D and physical environment settings are default.
gdscript move code:

func _physics_process(delta: float) -> void:
	var vel:Vector2=Vector2.ZERO
	if Input.is_action_pressed('move_left'):
		vel+=Vector2(-1,0)
	elif Input.is_action_pressed('move_right'):
		vel+=Vector2(1,0)
		
	if Input.is_action_pressed('move_up'):
		vel+=Vector2(0,-1)
	elif Input.is_action_pressed('move_down'):
		vel+=Vector2(0,1)
		
	player.velocity=vel.normalized() * Speed * delta 
	player.move_and_slide()

note: there are no changes to the on snap_2d_vertices_to_pixel option.

Steps to reproduce

add tilemap,add CharacterBody2D,write code to see how it behaves.

Minimal reproduction project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants