- Edited
i get this error sometimes>
E 0:00:20:0532 _process: Up vector and direction between node origin and target are aligned, look_at() failed.
<C++ Fout> Condition "p_up.cross(p_target - p_pos).is_equal_approx(Vector3())" is true.
<C++ Bron> scene/3d/node_3d.cpp:796 @ look_at_from_position()
this is the code
if result:
var collider = result.collider
var n = result.normal
var p = result.position
var impact = impact_normal.instantiate()
collider.add_child(impact)
var impactparticles = impact_particles.instantiate()
get_tree().get_root().add_child(impactparticles)
impact.global_transform.origin = p
if (p == n):
impact.look_at(n)
else:
impact.look_at(p + n)
how do i fix it?