Primitives(textures?) are not sharp when (side?)moving

Godot Version

4.6.1.stable.official

Question

Building a simple house in godot. When moving (mostly fast left-right or rotating) edges are not sharp).

video (Edit: I can’t post a video link apparently)

All settings are default.

TAA is disabled. Tried with antialiasing and it didn’t help (maybe wrong settings tried).

Tried with godot demo 3d project and seems ok

Here is the simple movement code that I use:

extends CharacterBody3D

const SPEED = 5.0
const MOUSE_SENSITIVITY = 0.002
const GRAVITY = 9.8

@onready var camera = $Camera3D

var y_velocity = 0.0
var x_rotation = 0.0

func _ready():
	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _unhandled_input(event):
	if event is InputEventMouseMotion:
		rotate_y(-event.relative.x * MOUSE_SENSITIVITY)

		x_rotation -= event.relative.y * MOUSE_SENSITIVITY
		x_rotation = clamp(x_rotation, deg_to_rad(-90), deg_to_rad(90))
		camera.rotation.x = x_rotation

func _physics_process(delta):
	var direction = Vector3.ZERO

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

	direction = direction.normalized()

	velocity.x = direction.x * SPEED
	velocity.z = direction.z * SPEED

	if not is_on_floor():
		velocity.y -= GRAVITY * delta
	else:
		velocity.y = 0

	move_and_slide()

Thanks in advance!

Do you mean the edges of the rendered shapes being jagged?

What resolution is your project running at?

V-Sync is set to Adaptive

resolution (viewport size) tried from default one (windowed) to 2560x1440

no difference

I’m talking about more like vertical edges are not smoothly moving. Don’t know what is the correct term for it. If you take my video and play at 0.25 speed it is visible that vertical edge of the door frame is smoothly rendered when I’m moving camera. Vertical part like rendered with a delay (if 0.25 speed) or in game it is visible like vertical edge become multi edge (multiple vertical edges near each other).

If I move camera up and down same issue - vertical edges are smooth and horizontal are not

There is might different or connected issue. Edges are not smooth neither even if camera is static

another view:

update:
Found out that when camera is rotating around the Y) then edges are ok. When moving camera left-right (horizontal move of the player) while looking at a door a wall with a texture then there is an issue. For edges it is how it was already described. For textures they become blurry.

Maybe it is related to the characterbody script?

extends CharacterBody3D

const SPEED = 5.0
const MOUSE_SENSITIVITY = 0.002
const GRAVITY = 9.8

@onready var camera = $Camera3D

var y_velocity = 0.0
var x_rotation = 0.0

func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _unhandled_input(event):
if event is InputEventMouseMotion:
rotate_y(-event.relative.x * MOUSE_SENSITIVITY)

	var invert = -1 if Settings.mouse_invert else 1
	x_rotation -= event.relative.y * MOUSE_SENSITIVITY * invert
	x_rotation = clamp(x_rotation, deg_to_rad(-90), deg_to_rad(90))
	camera.rotation.x = x_rotation

func _physics_process(delta):
var direction = Vector3.ZERO

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

direction = direction.normalized()

velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED

if not is_on_floor():
	velocity.y -= GRAVITY * delta
else:
	velocity.y = 0

move_and_slide()

here is windowed version when I’m moving the entire window with mouse

window decoration remains smooth. Content is like dragged with a delay. Check at 0.25 speed and you’ll see that content has a grey vertical / horizontal bars when moving

update: video I can’t post :frowning:

also tried to export as executable. That issue persists.

What happens if you rename _physics_process() to _process() and disable vsync?

just tried with demo project 3d_graphics_settings

those grey bars are clearly visible when moving horizontally window with that demo project

answering my own question.

that issue was fixed (almost fixed) by enabling that option

Project Settings → Physics → Common → Physics Interpolation

that solves the issue

found out that _physics_process() runs at 60 ticks per second by default

Another option for me was to enable

Project Settings → Physics → Common → Physics Interpolation

Seems same effect

1 Like