Godot Version
v4.2.2.stable.official [15073afe3]
Question
I am trying to draw some lines to display the steering forces being applied. The most obvious issue is that the line is set to draw in green, but is drawing black. It’s such an immediate issue that I assume I am missing something. The second issue is that one end of the line should be on the Actor
node creating the line, but it is significantly offset. Due to trying both position
and global_position
shouldnt at least one end of the line have been attached to the Actor
?
Code to draw line:
## actor.gd
func _draw():
draw_line(position, _debug_info["target"], Color.GREEN, 1.0)
draw_string(_debug_font, _debug_info["target"], "T", HORIZONTAL_ALIGNMENT_CENTER, -1, 8, Color.GREEN)
Using global_position
:
Using (local) position
: