_process: Node origin and target are in the same position, look_at() failed, Godot 4 version

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

So, in Godot 3.x I recall fixing this with a simple condition:

if NOT looker and lookee are in the same global_transform.origin: perform look_at.

Godot 4 (alpha 15) seems to be ignoring this condition and I’m getting hundreds of this error on every frame.

Anyone know how to get rid of this in 4.0?

:bust_in_silhouette: Reply From: sotlol

Very late answer, but I struggled with this too.

if global_transform.origin.is_equal_approx(target):
	return

This should work.

thanks a lot

Aancapo | 2023-06-28 02:00